Airflow will keep showing example dags even after removing it from configuration

Airflow 1.10+:

  • Edit airflow.cfg and set load_examples = False
  • For each example dag run the command airflow delete_dag example_dag_to_delete

This avoids resetting the entire airflow db.

(Since Airflow 1.10 there is the command to delete dag from database, see this answer )


Assuming you have installed airflow through Anaconda. Else look for airflow in your python site-packages folder and follow the below.

After you follow the instructions https://stackoverflow.com/a/43414326/1823570

  • Go to $AIRFLOW_HOME/lib/python2.7/site-packages/airflow directory
  • Remove the directory named example_dags or just rename it to revert back
  • Restart your webserver

cat $AIRFLOW_HOME/airflow-webserver.pid | xargs kill -9

airflow webserver -p [port-number]


There is currently no way of stopping a deleted DAG from being displayed on the UI except manually deleting the corresponding rows in the DB. The only other way is to restart the server after an initdb.