How do I uninstall gitosis?

8,120

Solution 1

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.

Solution 2

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.

Share:
8,120

Related videos on Youtube

Oscar Del Ben
Author by

Oscar Del Ben

Updated on September 17, 2022

Comments

  • Oscar Del Ben
    Oscar Del Ben almost 2 years

    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.

  • Alvin
    Alvin over 14 years
    That worked, but the ssh configuration still remains.
  • Gregory Pakosz
    Gregory Pakosz over 14 years
    I edited the answer. I think deleting the home directory of the git user is all you need to do about ssh configuration.
  • Gregory Pakosz
    Gregory Pakosz over 14 years
    consider associating your two accounts: stackoverflow and serverfault
  • Hamy
    Hamy almost 13 years
    I had to modify to sudo cat uninstall.txt | sudo xargs rm -rf