Fahad
Fahad

Reputation: 55

Unininstalling git on mac

How to uninstall git from my terminal? I have been having security issues and my passwords might have been stolen. I would like to delete git forever.

Upvotes: 0

Views: 167

Answers (2)

tripleee
tripleee

Reputation: 189497

Technically, removing the file /usr/bin/git will do what you are asking, but

  • it will possibly break other parts of your system;
  • it will not remove several components which git also installs;
  • the system will probably restore this file next time you upgrade or repair it;
  • most importantly, it will not help solve the problem you say you want to solve.

You wil be much better off if you accept that system-installed components cannot easily be uninstalled, and tackle the issue from a different angle altogether.

If indeed your credentials have been compromised, replace the password (or close your account) on all affected services. What software you have installed locally has absolutely no bearing on what someone can do with a password to another set of computer systems, anyway.

Conversely, if you believe that git somehow has allowed an intruder access to your local computer, merely removing git will not prevent them from continuing to control your computer if they are at all competent. The only remedy is to reinstall your system from trusted sources, probably then still with git but with entirely different passwords etc. Needless to say, you need known-good backups of all non-system files, or an extremely careful and tedious process to investigate for each file with any sort of priveleged information whether or not it needs to be replaced.

Upvotes: 2

Marek Puchalski
Marek Puchalski

Reputation: 3659

If your git credentials have been stolen, then uninstalling git is one of your minor problems (and honestly, will not solve the issue). Think what did you have the credentials for? Was it github? If so, go to github and change all your credentials there.

If your computer has been compromised, then the issue goes even deeper than this. Hope this is not the case.

Upvotes: 2

Related Questions