How do I uninstall git version 1.6.5.1 from Mac OS X 10.5.8

后端 未结 5 1847
臣服心动
臣服心动 2020-12-29 22:25

How do I uninstall git version 1.6.5.1 from Mac OS X 10.5.8?

相关标签:
5条回答
  • 2020-12-29 23:05

    I know this question is specifically about git 1.x, but if you're on git 2.x, there is an uninstall script in your git directory. In my case, it was at:

    /usr/local/git/uninstall.sh

    0 讨论(0)
  • 2020-12-29 23:06

    You can do which git to get the path to the git binary. It should be pretty clear where the git stuff is installed from that. I believe the graphical installer puts it in /usr/local/git by default. Just remove that directory, and if you want, remove it from your PATH environment variable as well.

    0 讨论(0)
  • 2020-12-29 23:07

    I recently had to upgrade from 1.9.3 to 2.2.1 on Mac OSX 10.10.1

    I successfully ran the installer for 2.2.1, but the command line "git --version" still showed 1.9.3.

    It turns out that 2.2.1 was successfully installed to /usr/local/git/bin and the directory was added to my path. However, 1.9.3 was installed in /usr/bin, which appeared in my shell PATH variable before /usr/local/git/bin, and so was being called before the updated version.

    This was fixed by running "sudo rm -rf /usr/bin/git*" and restarting the command line.

    FYI: if you think you're having a similar issue, you can find the various versions of git in your PATH by running "type -a git"

    0 讨论(0)
  • 2020-12-29 23:08

    Just download the new git version you want, and run uninstall.sh (that comes in the git.zip)

    0 讨论(0)
  • 2020-12-29 23:10

    if which git returns /usr/local/git/bin/git as jimmy pointed out,

    rm -rf /usr/local/git
    rm /etc/paths.d/git
    rm /etc/manpaths.d/git
    

    should do the trick

    source here

    0 讨论(0)
提交回复
热议问题