4

I installed Git on Ubuntu Lucid (latest) manually as following.

cd ~/tmp

wget http://kernel.org/pub/software/scm/git/git-1.7.0.6.tar.gz

tar -xzvf git-1.7.0.6.tar.gz
cd git-1.7.0.6.tar.gz
./configure
sudo make
sudo make install

Now, how can I completely uninstall it?

4
  • are the contents of ~/tmp/git-1.7xxxxx still there?
    – hasen
    May 4, 2010 at 19:21
  • You'll want to install packages through apt when possible. Ubuntu Lucid has the latest version of git in Apt as git-core.
    – Zack
    May 4, 2010 at 22:11
  • @hasen, Yes the files are there in tmp.
    – millisami
    May 5, 2010 at 7:39
  • @Zack, initially I couldn't find the git-core in package manager. Then I installed it via source. Later when I changed the source to US server, then I see the git-core package. But I've already installed it via source, hence the problem.
    – millisami
    May 5, 2010 at 7:41

2 Answers 2

6

Use installwatch (aka checkinstall) to see what it actually installed, then delete the files. Note, this requires running make install again, just under installwatch.

Check, first to make sure an uninstall target does not exist (e.g try make uninstall). make help might also be of use.

Unless you really need a feature in a newer version of something that your distro packages (or unless they simply don't package it), its generally a good idea to install stuff using the package manager, for just this reason.

3
  • Installwatch runs on Windows - not sure it applies to Ubuntu. Also, I think it would have to be installed before git to be useful. May 4, 2010 at 19:19
  • Ah - that link is much better, and I hadn't seen it before so thanks ;o) May 4, 2010 at 19:40
  • as @mike said, does this work after installing git?
    – millisami
    May 5, 2010 at 8:43
4

I solved this with the following step:

sudo find /usr/local -depth -iname 'git*' -exec rm -rf {} \;

That deleted all the git related files. Then used the apt-get to install git-core.

The reason behind this trouble is:

2
  • 1
    As long as you haven't installed 'gitarHero' on your system... ;-) (PS: I know the spelling isn't correct)
    – Boldewyn
    May 5, 2010 at 10:10
  • 1
    Don't forget about .gitconfig in ~
    – Zack
    May 5, 2010 at 14:17

You must log in to answer this question.

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