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.

3 Answers 3


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.

  • That worked, but the ssh configuration still remains.
    – Oscar Del Ben
    Commented Dec 7, 2009 at 22:25
  • I edited the answer. I think deleting the home directory of the git user is all you need to do about ssh configuration. Commented Dec 7, 2009 at 22:39
  • 3
    I had to modify to sudo cat uninstall.txt | sudo xargs rm -rf
    – Hamy
    Commented Aug 17, 2011 at 3:26

To remove the actual gitosis files you'll want to delete them from the same directory as git. Normally it would be in /usr/local/bin but if you are using a package installer like homebrew or macports it might be somewhere else. To find out where git is installed type this in a terminal window:

which git

That will tell you where git is installed and that's where gitosis should be.
Now cd to that directory and you should be able list and remove the files like so:

ls gitosis*  
rm gitosis* 

That should be all you need to do. I've also had lots of problems with gitosis. Mainly that it insists on creating a repositories folder when I don't want one. I'm using a simple ruby script to move my files around now after upload and that's working a lot better.


Thanks. I did not have a git user, but deleting the .ssh/authorized_keys file did the trick.

  • consider associating your two accounts: stackoverflow and serverfault Commented Dec 8, 2009 at 16:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .