Deleting a DAG on an Airflow Cluster¶
You can delete a DAG on an Airflow Cluster from the Airflow Web Server.
Before you delete a DAG, you must ensure that the DAG must be either in the Off state or does not have any active DAG runs. If the DAG has any active runs pending, then you should mark all tasks under those DAG runs as completed.
- From the Clusters page, click on the Resources drop-down list against the airflow cluster, and select Airflow Web Server. The Airflow Web Server is displayed as shown in the illustration.
- Click DAGs tab to view the list of DAGs.
- Click on the delete button under the Links column against the required DAG.
- Click OK to confirm.
By default, it takes 5 minutes for the deleted DAG to disappear from the UI. You can modify this time limit by configuring the
scheduler.dag_dir_list_interval setting in the
This time limit does not work on sub-DAG operators.
It is recommended not to decrease the time limit value substantially because it might lead to high CPU usage.