Ya' row ze: Lets go!

You are here

How to reverse something installed

A lesson I'm finally starting to learn is to avoid using sudo to do things as much as possible.

The other day I wound up screwing up and trying to force install a python package like so:

git clone [ansible.github.path]
...
make install
[failure]
sudo make install

this wound up installing ansible (in this case) with root permissions and caused all kinds of problems for continued use when attempting to use it w/o sudo - specifically when trying to get my vagrant provisioning script to run.

after about the millionth attempt at reinstalling failed, I decided to figure out how to uninstall/remove components I had built. It took some digging, but eventually I found the following few commands:

sudo make -n install
sudo python setup.py install --record files.txt
cat files.txt | sudo xargs rm -rf

the keys here are the "make -n" does a dry run to show any components that were created. The next python command lists all files created in the install process, and the next command just deletes everything.

this wound up really bailing me out. I eventually found a homebrew installer for ansible, and things are much better now.

Back to top