Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
how to cleanly uninstall python packages installed with python setup.py
# Next time you need to install something with python setup.py -- which should be never but things happen.
python setup.py install --record files.txt
# This will cause all the installed files to be printed to that directory.
# Then when you want to uninstall it simply run; be careful with the 'sudo'
cat files.txt | xargs sudo rm -rf
@LukeAllen

This comment has been minimized.

Copy link

@LukeAllen LukeAllen commented Mar 20, 2017

Pip can usually uninstall a package that was installed with setup.py: sudo pip uninstall the-package-name

@josephjoice

This comment has been minimized.

Copy link

@josephjoice josephjoice commented Oct 18, 2017

But pip is not removing the scripts installed

@SunilPatilGIT

This comment has been minimized.

Copy link

@SunilPatilGIT SunilPatilGIT commented Oct 26, 2017

Thanks a lot. I have successfully executed the uninstall.sh script as admin.

@Aditi1Singh

This comment has been minimized.

Copy link

@Aditi1Singh Aditi1Singh commented Jun 20, 2018

I tried to manually delete all the files in the dlib module, but the Tools folder remains. Any idea how to remove the module permanently?

@edisonex

This comment has been minimized.

Copy link

@edisonex edisonex commented Aug 11, 2020

Thanks!

@DJ004

This comment has been minimized.

Copy link

@DJ004 DJ004 commented Mar 18, 2021

Thanks, Luke!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment