(Note: I have not tested this on Snow Leopard. Drop me a note if you’ve tried on SL and it worked.)
More and more people I know are jumping onto the Mac OS platform via their purchases of Macbooks or iMac’s. Eventually, everyone runs into issues around system sluggishness and their computer just seems to run slower. Well, one reason for that slowness is accumulated cache and other junk that adds up over time. Here are some general cleanup tips and system commands that you can run on your computer to ensure its ongoing health.
- Empty your downloads directory (your_home_directory/downloads). since your browser downloads are pointed towards this directory, over time it fills up with junk.
- If you use Microsoft Office (any version), clean out the Saved Attachments directory (your_home_directory/Documents/Microsoft User Data/Saved Attachments)
You’ll need to use the Terminal application to run the next series of commands. At the end of each command, you will need to press the enter key in order to execute….I am assuming you know your way around the OSX command line.
Disclaimer: i also assume that you know what you are doing because executing commands in Terminal as a system admin privileged user can also wreak havoc if you make mistakes in executing these commands.
- run the OSX maintenance scripts (these run automatically but no harm in manually running them either):
sudo periodic daily weekly monthly (put in your system password when asked) - Flush the user and cache and logs (unless you need to keep them, most regular users don’t need to):
cd ~/Library/Logs
sudo rm -rf ~/Library/Logs/*
rm -rf ~/Library/Safari/Downloads.plist
cd ~/Library/Caches
sudo rm -rf ~/Library/Caches/* - Flush global and system cache:
cd /Library/Caches
sudo rm -rf /Library/Caches/*
cd /System/Library/Caches
sudo rm -rf /System/Library/Caches/* - check for corrupted preference files on your computer:
cd ~/Library/Preferences
plutil -s *.plist
cd /Library/Preferences
plutil -s *.plist - Flush the directory services cache:
dscacheutil -flushcache - Flush LaunchServices database (fixes duplicate Open With entries, etc). This entire command needs to be typed into one line.
System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user - Flush Apple Type Server (ATS) cache
sudo rm -rf `lsof | grep com.apple.ATS/annex.aux | grep Finder | cut -c 66-139`
sudo rm -rf /private/var/folders/*/*/-Caches-/com.apple.ATS - update application prebinding:
sudo update_prebinding -root / -force - Repair disk volume and permissions:
sudo diskutil rerpairVolume
sudo diskutil repairPermissions
No related posts...sorry
hook me up!