Last active
December 14, 2015 02:49
-
-
Save ClarkGoble/5016803 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# get rid of duplicate apps by reindexing | |
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seed -r -domain local -domain system -domain user | |
# reindex mail | |
rm $HOME"/Library/Mail/v2/MailData/Envelope Index" | |
rm $HOME"/Library/Mail/v2/MailData/Envelope Index-shm" | |
rm $HOME"/Library/Mail/v2/MailData/Envelope Index-wal" | |
# cleanup downloaded mail attachments (you can always redownload later) | |
rm -r $HOME"/Library/Mail Downloads/" | |
# make Library visible | |
chflags nohidden $HOME/Library | |
# clean up my Desktop | |
mv $HOME/"Desktop/*" $HOME"/Documents/Temporary Files/" | |
# repair permissions | |
# run diskutil list to get the name of your partitions | |
diskutil repairPermissions disk4 | |
# clear out caches | |
rm -r $HOME"/Library/Caches/*" | |
sudo rm -r /Library/Caches/* | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice script, I forked it and added a few things I had in a similar script of mine.