Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

Thanks in advance!

share|improve this question

migrated from programmers.stackexchange.com Sep 25 '13 at 19:13

This question came from our site for professional programmers interested in conceptual questions about software development.

    
Unless you've really gone out of your way to break things, you can just delete the .git directory in your home directory ( ~/.git ) and your account will go back to everything as default. –  Sean McSomething Sep 25 '13 at 16:55
    
Why do you want to remove git? –  Thomas W. Sep 25 '13 at 19:21
    
@ThomasW. - why would you want to remove any program from your system? –  zharvey Apr 21 at 19:22

2 Answers 2

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

share|improve this answer
    
I am not sure why you want him to erase the .git folder. His individual git config --global are also in his /home/user/.gitconfig file. –  haziz Dec 17 '13 at 0:19
    
@haziz thanks, updated. –  Thomas W. Dec 17 '13 at 0:38

Reinstalling git with

sudo apt-get install git

will usually fix most installation issues.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.