如何卸载Airflow?Ubuntu 16.04下卸载Airflow v1.10.3遇阻求助
Hey there! Let's dig into why Airflow's still lingering on your Ubuntu 16.04 system even after you tried those uninstall steps. Here's a step-by-step plan to wipe it out completely:
Start by finding exactly where the airflow command is located—this will tell us how it was installed in the first place:
which airflow
This might output something like /usr/local/bin/airflow or /home/your_username/.local/bin/airflow. Jot that path down for later.
- First, remove the actual command file directly:
sudo rm -f $(which airflow) - Next, hunt down Airflow's Python packages. On Ubuntu 16.04, Python 3's site-packages are usually in one of these locations:
/usr/local/lib/python3.5/site-packages/(system-wide installation)/home/your_username/.local/lib/python3.5/site-packages/(user-specific installation)
Delete any folders starting withapache-airflowusing:
# Replace the path with the one you found in your system sudo rm -rf /usr/local/lib/python3.5/site-packages/apache-airflow* - Don't forget Airflow's default configuration directory—it's almost always in your home folder:
rm -rf ~/airflow - If there's a system-level config folder (less common but possible), delete that too:
sudo rm -rf /etc/airflow
Since you removed pip3 earlier, let's reinstall it to make sure we can clean up any remaining package traces:
sudo apt-get update && sudo apt-get install python3-pip
Then run a full, automated uninstall to catch any leftover Airflow packages:
pip3 uninstall -y apache-airflow
The -y flag skips confirmation prompts so it can clean everything without extra input.
Sometimes bash remembers commands even after the underlying files are gone. Run this to refresh its cache:
hash -r
Now try typing airflow again—it should return a "command not found" message if we've cleaned everything up.
内容的提问来源于stack exchange,提问作者Yassin Abid

