How to Uninstall Pytorch ( conda, pip ,Pycharm )

How to Uninstall Pytorch

Pytorch is an open-source machine learning library. It is a framework that has been built upon the torch library. Using PyTorch you can build a computer vision and Natural Processing Language ( NLP ) application. If you have already installed pytorch in your system and want to uninstall it from your system then this post is for you. In this entire tutorial, you will learn how to uninstall PyTorch on different terminals.

How to uninstall PyTorch with Anaconda?

If you have installed Pytorch on Anaconda and want to uninstall it then you can use the conda command for that. Open your anaconda terminal and type the following conda command.

conda uninstall pytorch

It will successfully uninstall the Pytorch from the anaconda packages.

Uninstalling pytorch on anaconda prompt
Uninstalling pytorch on anaconda prompt

Uninstall PyTorch using pip

There is also another way to remove Pytorch from the Python packages. To do you have to use the pip command.  Pip is a Python module that is already installed with the Python module.

Before using the pip command you have to check the version of python. If your system has Python 3. xx installed then you will use the pip3 command. And if your system has python 2. xx then you will use the pip command.

To check the version of the python you have to run the below command.

python --version


Checking Python version before installing spacy
Checking the Python version before installing spacy

My system has python 3. xx installed, so I will use the pip3 command to uninstall PyTorch. If your system has python 2.xx then use the pip unistall torch command.

Run the below command to uninstall the PyTorch using pip.

pip3 uninstall torch
Unsitalling pytorch using the pip
Uninstalling PyTorch using the pip

Uninstall PyTorch from Pycharm

If you have installed PyTorch in pycharm, then you can easily uninstall PyTorch.  Follow the below steps to uninstall PyTorch from Pycharm.

Step 1: Go to File and click Settings.

Step 2: Go to the project Interpreter.

Here you will find all the packages installed in your PyTorch environment.

Installed Packages list in Pycharm
Installed Packages list in Pycharm

Step 3: Search for the torch package.

Step 4: Select on torch package and click on the ” – “ sign to uninstall the torch package.

Uninstalling Pytorch from Packages list in Pycharm
Uninstalling Pytorch from Packages list in Pycharm

Uninstall using easy_install

You can also uninstall Pytorch if you have installed the module using the easy_install. To do so you have to easy_install -m command. Open your terminal and type the below command to uninstall the Pytorch from the system.

easy_install -m pytorch

It will uninstall Pytorch from your system.

Uninstall from the source

If you installed PyTorch from the source you can uninstall it by removing the Pytorch folder from your system. As its all dependencies are in the folder they will automatically be removed when you remove that folder.


Pytorch is a popular machine learning library for OpenCV and NLP applications. This framework is managed by open-source community and built by Facebook. If you want to uninstall Pytroch from your system then the above methods will work for you. I hope you have liked this tutorial. If you have any queries then you can contact us for more help.


Frequently Asked Questions

1. How to install Pytorch?

You can install PyTorch using the pip command. But before that check the version of python. If your python version is 3. xx then use the pip3 command and if it is 2. xx then use the pip command.

For python 3. xx 

pip3 install torch

For python 2. xx

pip install torch

If you want to install Pytorch  in Pycharm ide then you can read how to install Pytorch in Pycharm. There you will know the various ways to install the Pytorch module in the IDE.

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for signup. A Confirmation Email has been sent to your Email Address.

Something went wrong.

Thank you For sharing.We appreciate your support. Don't Forget to LIKE and FOLLOW our SITE to keep UPDATED with Data Science Learner