Celeb Glow
general | March 23, 2026

How to uninstall TensorFlow completely?

I accidentally installed TensorFlow for Ubuntu/Linux 64-bit, GPU enabled. When I installed with Linux 64-bit CPU only, I am getting Segmentation fault while importing tensorflow from python console.

1

2 Answers

Depends on how you install it considering the fact that there are multiple ways to do it here. Most generic way people do it is through pip, check using:

sudo pip show tensorflow

Uninstall using:

sudo pip uninstall protobuf
sudo pip uninstall tensorflow

Install it using:

sudo pip install --upgrade 
10

When running in conda env or any virtual env sudo doesn't work. So you can use:

python3 -m pip uninstall protobuf
python3 -m pip uninstall tensorflow-gpu

python3 -m is safest way to ensure that you are using pip3 and not pip2.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy