How to remove installed packages with python

11

I downloaded a package with wget , unpacked and accessed the folder, I used the command:

python setup.py install

It ran without any errors, but now I no longer use this program, what is the correct way to uninstall the program?

    
asked by anonymous 23.04.2015 / 14:31

1 answer

7

As can be seen in this SOEN response , you need to manually remove the files. If you do not know what these files are, you can use the --record parameter during setup to list these files, as in the following example

python setup.py install --record files.txt

This will generate a files.txt file, which will list all files. If you are in Windows, simply delete them from the directory manually. If you are on Linux, you can use the following command in the shell:

cat files.txt | xargs rm -rf

If you have pip installed, based on in this other SOEN response , you can use it to try uninstall it in a simpler way. For this you can use the command:

pip freeze

This will list all the packages that the pip has identified that are installed. If it has found the package you want to uninstall, simply type:

pip uninstall o.nome.do.pacote.que.voce.quer.remover

If he requests a confirmation to delete these packages, it means that everything went well, just confirm the uninstallation.

    
23.04.2015 / 14:35