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
python 2.x
# sudo pip uninstall django
python 3.x
# 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.
Related posts:
How to Import Python Modules by String Name
How to Find Django Install Location
How to Create Cartesian Product of Two Lists in Python
How to Compare Dictionary in Python
How to Use Sleep Function in Python
How to Combine Two Querysets in Django
How to Read File Line by Line Into Python List
How to Get Classname of Instance in Python

Sreeram has more than 10 years of experience in web development, Python, Linux, SQL and database programming.