8

About 6 months ago I tried installing git and ended up botching the install/configuration. I was then called away to another project and no longer needed to use git. I'm back to the project now, and would like to reinstall git completely from scratch. So I ask:

How do I completely uninstall git from my Ubuntu Desktop 12.04 machine?

When I run which git I get:

/usr/bin/git
0

5 Answers 5

9

you can use this command:

sudo apt-get remove git
0
4

Your personal settings for your user related to git are usually stored in ~/.git which is the .git folder in your /home/$USER folder.

Just remove ~/.gitconfig and your settings will return to a pristine, unconfigured state.

if you REALLY want to remove git completely and start over which you don't really need to do ever, do the above statements to remove the .git folder, then do: sudo apt-get purge git; sudo apt-get autoremove; sudo apt-get install git

0
0

Reinstalling git with

sudo apt-get install git

will usually fix most installation issues.

0

I faced the similar issue when another git client was installed on my ubuntu 18.04 LTS without my with a different path :

PATH=/home/pradan/ti-processor-sdk-linux-am57xx-evm-06.02.00.81/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:...other variables...:/snap/bin

To remove it, the PATH VARIABLE needs to be changed. Changing the path can be seen in this question How can I edit the $PATH on linux?

Then, the git files in the same directory can be deleted.

0

To remove just git package itself from Ubuntu execute on terminal: sudo apt-get remove git Uninstall git and it's dependent packages sudo apt-get remove --auto-remove git

from here

You must log in to answer this question.

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