arjunanan6 opened a new issue, #31184: URL: https://github.com/apache/airflow/issues/31184
### What do you see as an issue? We recently removed a bunch of our old dags. However, this left behind the tags that used within those DAGs behind. Unfortunately, I cannot find a simple way to clean up the tags besides directly going into the metadatabase and deleting it from there. The ```airflow db clean``` CLI command also does not help in my case, as it would also remove the DAG itself if run with, for example: ```airflow db clean -t dag --clean-beforetimestamp '2023-05-10'``` Also, dag_tag is not a valid table selection for this command. Another strange issue is that the tags are also displayed in a non-alphabetical order. Example:  I could not reproduce this issue with the non-alphabetical list order in a local dev environment at least. Is there a smarter way to clean up the tags and get it to show in a right order? I am willing to submit a PR if I can get some guidance :) ### Solving the problem Probably with the introduction of a new table for the clean command such as ```airflow db clean --tables dag_tag``` ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
