![Uninstall Git On Mac Uninstall Git On Mac](https://linux4one.com/wp-content/uploads/2019/01/How-to-Install-PyCharm-on-CentOS-7-1.jpg)
Would remove jpt/ Would remove main.pyc The -d option is for listing directories that are going to be deleted. If any of the files or directories listed by the command are important and we want to keep them, we need to either add them to the repository using git add command or list them in.gitignore file. Here I am at git-scm.com, you can see here's a quick link to take me straight to the Mac page, or I can click on downloads, and then from there I can choose my operating system, and then it says.
uninstall-GHfM.sh
#!/bin/bash |
functionremove_dir () { |
rm -rf '$1_' |
if [ -d'$1' ] |
then |
mv '$1''$1_' |
fi |
} |
echo'*** Removing saved user, repositories, and orgs…' |
remove_dir '${HOME}/Library/Application Support/GitHub for Mac' |
remove_dir '${HOME}/Library/Application Support/com.github.GitHub' |
echo'*** Removing preferences…' |
if [ -e'${HOME}/Library/Preferences/com.github.GitHub.plist' ] |
then |
cp -f '${HOME}/Library/Preferences/com.github.GitHub.plist''${HOME}/Library/Preferences/com.github.GitHub.plist_' |
fi |
defaults delete com.github.GitHub |
defaults delete com.github.GitHub.LSSharedFileList |
echo'*** Removing caches…' |
rm -rf '${HOME}/Library/Caches/GitHub for Mac''${HOME}/Library/Caches/com.github.Github' |
echo'*** Stopping and removing Conduit…' |
launchctl remove com.github.GitHub.Conduit |
rm -rf '${HOME}/Library/Containers/com.github.GitHub.Conduit' |
echo'*** Removing SSH key…' |
find ${HOME}/.ssh -name '*github*_rsa'|whileread KEY |
do |
ssh-add -dK '$KEY.pub' |
mv -f '$KEY''$KEY.bak' |
mv -f '$KEY.pub''$KEY.pub.bak' |
done |
echo'*** Removing keychain items…' |
security -q delete-internet-password -s github.com/mac |
security -q delete-generic-password -l 'GitHub for Mac — github.com' |
security -q delete-generic-password -l 'GitHub for Mac SSH key passphrase — github.com' |
echo'*** Removing command line utility…' |
if [ -e'/usr/local/bin/github' ] |
then |
sudo rm -f /usr/local/bin/github |
fi |
if [ -e'/Library/LaunchDaemons/com.github.GitHub.GHInstallCLI.plist' ] |
then |
sudo rm -f /Library/LaunchDaemons/com.github.GitHub.GHInstallCLI.plist |
fi |
echo'*** Removing git symlinks…' |
find /usr/local -lname '*GitHub.app*' -exec sudo rm -f {} ; |
commented Jan 13, 2014
How To Uninstall Git
Dude! I get a review of bash scripting with the deal!! Thank you Sir. |
commented Nov 16, 2014
commented Jun 16, 2015
commented Feb 5, 2020
Great script. Question comes to mind though , why no one have thought to add such tool to the Application itself. Mac applications have no real need of 'Installer', as they can be self-contained Bundles (file hierarchies, opaque to the user, and appear as one file), but if an application spreads itself so widely over the Mac - why not at least provide a 'Remove Application' menu item, that will run a similar script??? beats me. Mp3 editor for mac free download. |
Mac Remove Git
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment