Python – How to uninstall gitosis

gitpythonuninstall

I've installed gitosis on my dramhost machine but now I want to uninstall it because it's causing more problems than solutions.

The thing is that I can't find how to uninstall it. I deleted the ~/repositories directories but of course all the bins are still included. Also I'm more worried about what it did to ssh configurations.

Best Answer

Clone the gitosis git repository again and then install it again using the --record option:

sudo python setup.py install --record uninstall.txt

Which will produce a text file containing all the installed files. Then just delete them.

sudo cat uninstall.txt | sudo xargs rm -rf

You may want to remove the git user:

sudo userdel -f git

as well as the git group:

sudo groupdel [git]

The ssh configuration consists in entries in the .ssh/authorized_keys which is going to be deleted along with the git user home directory.