login
Header Space

 
 

Re: Uninstalling Git

Previous thread: user-manual changes by J. Bruce Fields on Sunday, September 23, 2007 - 1:27 pm. (1 message)

Next thread: Re: [PATCH] Allow shell scripts to run with non-Bash /bin/sh by Junio C Hamano on Sunday, September 23, 2007 - 3:20 pm. (8 messages)
To: <git@...>
Date: Sunday, September 23, 2007 - 2:30 pm

Hello!

This must be a stupid-obvious-newbie question but...

Well, the point is that I installed the git version 1.5.2.1 in an ubuntu 
box.  That was done following the INSTALL instructions in the 
corresponding tarball.  I typed:

$ make configure
$ ./configure --prefix=/usr/local
$ make all doc
$ sudo make install install-doc

First, I'd like to uninstall the thing completely, how do I do that?

Second, what would be the correct procedure to follow if I would like 
just to upgrade to a newer version? install over the older perhaps? Is 
that always safe in the sense that there won't be any dangling piece of 
bin nor doc?

Thanks in advance!
-
To: <in-call@...>
Cc: <git@...>
Date: Sunday, September 23, 2007 - 3:31 pm

Hi,


I'd use checkinstall to install it (again), and then use the distro's 

On Linux this should be safe at all times.

Hth,
Dscho

-
To: <git@...>
Date: Sunday, September 23, 2007 - 3:47 pm

Hello!

Oh! great solution! I didn't know this tool, I'll do that! Thanks a lot!


-
To: <in-call@...>
Cc: <git@...>
Date: Sunday, September 23, 2007 - 3:06 pm

Basically, you are screwed.  That being said, it might somewhat work
to do the following:

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

But I think you'll catch more if you apply the following patch, then
do

./configure --prefix=/opt/git
make all doc
sudo make install install-doc install-symlinks
sudo rm -rf /opt/git

There is some software called xstow which is supposed to do something
similar to the "install-symlinks" target of this patch.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

From: David Kastrup &lt;dak@gnu.org&gt;
Date: Wed, 18 Jul 2007 16:45:36 +0200
Subject: [PATCH] Makefile: create an install-symlinks target

[commit text mostly pinched from INSTALL]

An alternative global installation method making it much easier to
uninstall is to use a package-specific prefix like /opt/git, then
create symlinks from /usr/local into that hierarchy.  Uninstalling can
then be achieved by

	# rm -rf /opt/git; find /usr/local -lname '/opt/git/*' -delete

You can create a setup like that after having used one of the above
install recipes with prefix=/opt/git by writing

	# make prefix=/opt/git symlinkprefix=/usr/local install-symlinks

This works by copying the directory hierarchy of $prefix to
$symlinkprefix (not copying or descending to any directories of the
name git* matched case-insensitively), then linking all the rest.
---
 INSTALL  |   12 ++++++++++++
 Makefile |   10 +++++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/INSTALL b/INSTALL
index 289b046..38d6fdd 100644
--- a/INSTALL
+++ b/INSTALL
@@ -21,6 +21,18 @@ set up install paths (via config.mak.autogen), so you can write instead
 	$ make all doc ;# as yourself
 	# make install install-doc ;# as root
 
+An alternative global installation method making it much easier to
+uninstall is to use a package-specific prefix like /opt/git, then
+create symlinks from /usr/local into that hierarchy.  Uninstalling can
+then be achieved by
+
+	# rm -rf /opt/git; find /u...
Previous thread: user-manual changes by J. Bruce Fields on Sunday, September 23, 2007 - 1:27 pm. (1 message)

Next thread: Re: [PATCH] Allow shell scripts to run with non-Bash /bin/sh by Junio C Hamano on Sunday, September 23, 2007 - 3:20 pm. (8 messages)
speck-geostationary