Saturday, April 21, 2012

How to clean OSX (remove temp files and speedup your mac)

Clear OSX Space


The following set of procedures free some unnecessary files from your OSX drive and free space, also it sometimes help to fix slowness problems, but please be very very careful with the "sudo rm -f" command it is very dangerous so make sure you type it correctly.

Run cron tasks now

sudo periodic daily weekly monthly
Delete logs from your home folder
cd ~/Library/Logs
sudo rm -rf ~/Library/Logs/*
Delete cache from your home folder
rm -rf ~/Library/Safari/Downloads.plist
cd ~/Library/Caches
sudo rm -rf ~/Library/Caches/*
Flush Directory Service resolver cache (DNS, etc)
dscacheutil -flushcache
Update application pre-binding
sudo update_prebinding -root / -force
Repair disk permissions on boot volume
sudo diskutil repairPermissions /
Clear the global cache database
cd /Library/Caches
sudo rm -rf /Library/Caches/*
Flush system cache entries
cd /System/Library/Caches
sudo rm -rf /System/Library/Caches/*
Flush LaunchServices Database (helps with multiple "Open With" entries)
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
Flush Apple Type Server (ATS) cache (resolves issues with corrupt fonts some times)
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
Repair disk permissions on boot volume
sudo diskutil repairPermissions /
restart your OSX and enjoy a cleaner and more free space on your OSX

Shay.BC.

 
the menu is from: Milonic DHTML menus