Django is a popular framework to develop python-based websites. Sometimes you may need to remove Django completely to install a new version, or upgrade it. Here is how to uninstall Django in Ubuntu.
How to Uninstall Django in Ubuntu
Here are the steps to uninstall Django completely in Linux. It is quite easy. There are multiple ways to remove Django, depending on how you installed it.
Open terminal and run the following commands, depending on your installation.
Also read : How to install Django in Ubuntu
Uninstall Django using pip
If you want to confirm whether Django was installed using pip, run the following command. You will see django version as output
pip freeze | grep Django# Django==1.5
If you installed Django using pip tool, then run the following command to remove Django
# sudo pip uninstall django
# sudo pip3 uninstall django
Also read : How to Upgrade Python in Ubuntu
Uninstall Django using apt-get
If you had installed Django using apt-get then run the following command to remove it.
# sudo apt-get remove python-django
That’s it! Django will be uninstalled from your system.