The post describe about how to remove python module installed from source code on Linux.
We use python setup.py install command to install the python module from source code. The related files copied to various path. Hence we will target these files copied in various path

You must have extracted(untar) source code of that particular version of python module.

Change to extracted directory and run below given command.

cd Module-directory-name

Run the below given command.

python setup.py install --record removefiles.txt

Because of option --record , it will record the absolute path of modules files into removefiles.txt

The below given one liner , for loop will remove all files listed in removefiles.txt

for i in `cat removefiles.txt`;do rm -fr $i ;done

Read Some More Articles

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.