How to Turn Off the Example Dags in Apache Airflow®
A new Apache Airflow® installation fills its Dags page with examples: 119 of them in Airflow 3.4.0. They're handy for looking around, but they bury your own Dags. One setting, load_examples, turns them off. This guide turns it off on an installation that already loaded them, and shows where they go.
Syntax
[core]
load_examples = False
export AIRFLOW__CORE__LOAD_EXAMPLES=False
| Part | What it means |
|---|---|
[core] | The section of airflow.cfg that load_examples belongs to |
load_examples | True loads the example Dags that ship with Airflow; False doesn't. The default is True |
AIRFLOW__CORE__LOAD_EXAMPLES | The same setting as an environment variable, which wins over the file |
The setting's own description in airflow.cfg says the examples are "good to get started, but you probably want to set this to False in a production environment".
Prerequisites
- Apache Airflow® installed, with
AIRFLOW_HOMEset to the folder that holds yourairflow.cfg.
Step 1: Check the Setting
airflow config get-value core load_examples
True
It's on, which is the default. This is what the Dags page looks like with it:

119 Dags, and none of them is mine. They come from Airflow itself and from two of the providers it installs, the standard and common SQL providers.
Step 2: Change It in airflow.cfg
Stop Airflow with Ctrl+C. Open airflow.cfg from your AIRFLOW_HOME folder, find load_examples in the [core] section, and change True to False:
# Whether to load the Dag examples that ship with Airflow. It's good to
# get started, but you probably want to set this to ``False`` in a production
# environment
#
# .. note::
#
# If you are using the Official Airflow Docker Image, this value is set to ``False`` by default
# via the environment variable ``AIRFLOW__CORE__LOAD_EXAMPLES``. To enable example Dags when
# using the official image, you must explicitly set ``AIRFLOW__CORE__LOAD_EXAMPLES=True`` in your
# environment.
#
# Variable: AIRFLOW__CORE__LOAD_EXAMPLES
#
load_examples = False

Check it:
airflow config get-value core load_examples
False
Step 3: Start Airflow Again
airflow standalone
Sign in and open Dags:

0 Dags, No Dags found. The examples are gone from the page, even though they had been loaded before.
Where the Example Dags Went
They weren't deleted. I looked in Airflow's database afterwards: all 119 were still there, marked as deactivated. Airflow's documentation on Dags explains it: when the Dag processor no longer finds a Dag it had stored, it deactivates it, keeps its history, and the UI doesn't show it. With load_examples = False, Airflow stops reading the example files, so their Dags are deactivated.
Set it back to True and they're read again, which the same page says reactivates them with their history.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
| Expecting the examples to be deleted | They're only deactivated and hidden | Nothing to fix: that's how Airflow keeps their history |
| Setting it in a second terminal's environment only | The other terminal's Airflow still loads them | Change airflow.cfg, which every terminal reads |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| The examples are still listed | Airflow wasn't restarted, or an environment variable sets True | Restart; check env | grep LOAD_EXAMPLES |
get-value prints True after the edit | You edited another folder's airflow.cfg | echo $AIRFLOW_HOME |
FAQ
Should I turn them off before the first start?
That's the cleanest way: set load_examples = False before you start Airflow for the first time, and the examples are never loaded.
Do my own Dags get deactivated too?
No. Only Dags whose files Airflow stops reading. Your dags folder is read as before.
Can I bring them back?
Set load_examples = True and restart. Airflow's documentation says a deactivated Dag becomes active again, with its history, when its file is read again. I didn't switch mine back for this guide.
Conclusion
load_examples was True, and the Dags page listed 119 example Dags. After changing it to False in airflow.cfg and restarting, the page showed No Dags found; the examples were deactivated, not deleted, so their history stays in the database.
Additional Resources
- Configuration reference: load_examples — the setting and its default.
- Dag pausing, deactivation and deletion — what deactivated Dags are.
Apache®, Apache Airflow and Airflow® are either registered trademarks or trademarks of The Apache Software Foundation in the United States and/or other countries. No endorsement by The Apache Software Foundation is implied by the use of these marks.
