I installed the git using this article. Now I want to uninstall the git. How to do it?
closed as not constructive by EEAA♦, Michael Hampton♦, Magellan, mdpc, Scott Pack Nov 1 '12 at 17:52
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.
I found the solution here.
If you were smart enough and used some non-standard prefix when configured Git so that it has been installed under a specific hierarchy, like under /opt/git, then just delete that hierarchy, recursively.
If not, then you could go like this:
1) Fetch the source tarball of exactly the version you built and installed, unpack.
2) Configure it exactly like you did with the original install with regard to installation locations (prefix, exec-prefix etc); supposedly you should just not override anything.
3) Create a temporary directory to perform installation, like this: $ mkdir /var/tmp/git
4) Install Git passing a proper DESTDIR variable to make: $ make DESTDIR=/var/tmp/git install The Git hierarchy will end up created under that temporary directory.
5) Use the created hierarchy to decide which files to delete under the real hierarchy ("/" itself).
The last step is where "the magic" happens so it bears more explanation. For instance, you could run
(as root) do delete the files installed by the first mis-installation
into the root filesystem. The encantation above uses the /var/tmp/git
hierarchy to print the list of files found, but it replaces the
"/var/tmp/git" prefix in them with "/", so that the
"/var/tmp/git/usr/bin/git" in the output will end up listed as
"/usr/bin/git". This list is then piped to
After dealing with files, run
to inspect the list of installed directories. These require manual
approach so just look at the generated list and think which of them you
In the future never install anything into a system by running
I just went though 2691 lines of Makefile. Indeed no make uninstall. Drat.
In that case a workaround might be to use the
In all future cases build a package (RPM, yum, whatever). It makes maintenance so much easier.