'Is it safe to delete airflow.db file?

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?



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Elad Kalif