Is it safe to delete airflow.db file?

563 Views Asked by At

I can't login in the web UI of airflow. I always get this Invalid login error.

When I run the airflow users list the users are there. So my option is to delete the airflow.db and run airflow db init again. I want to know if it is safe to do that?

1

There are 1 best solutions below

1
On

If the issue is with users then you can simply use create/delete user CLI:

create:

airflow users create [-h] -e EMAIL -f FIRSTNAME -l LASTNAME [-p PASSWORD] -r
                     ROLE [--use-random-password] -u USERNAME

delete:

airflow users delete [-h] [-e EMAIL] [-u USERNAME]

There is no need to run db init for the problem you described.