delete

Definition

Deletes all database records related to the specified DAG.

Usage

$ airflow dags delete [-h] [-v] [-y] dag_id

Arguments

Parameter Description

dag_id

The ID of the DAG to delete from the database

-h, --help

Print out the help manual for this command

-v, --verbose

Make logging output more verbose

-y, --yes

Do not prompt for confirmation

Examples

To delete information about the specified DAG, run:

$ airflow dags delete test_dag

Output example:

[2025-04-03T14:38:17.121+0000] {__init__.py:42} INFO - Loaded API auth backend: airflow.api.auth.backend.session
[2025-04-03T14:38:17.123+0000] {__init__.py:42} INFO - Loaded API auth backend: airflow.api.auth.backend.basic_auth
This will drop all existing records related to the specified DAG. Proceed? (y/n)
[2025-04-03T14:38:44.671+0000] {delete_dag.py:49} INFO - Deleting DAG: test_dag
Removed 1 record(s)
Found a mistake? Seleсt text and press Ctrl+Enter to report it