house cleaning for the mac…get your geek on

Technology

(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

5 Comments

5 Comments

  1. Rufor  •  Apr 18, 2009 @1:43 pm

    Greatings, Thanks for article. Everytime like to read you.
    Rufor

  2. AndrewBoldman  •  Jun 4, 2009 @7:23 am

    Hi, good post. I have been woondering about this issue,so thanks for posting. I’ll definitely be coming back to your site.

  3. Kelly Brown  •  Jun 12, 2009 @9:45 am

    I really like your post. Does it copyright protected?

  4. JaneRadriges  •  Jun 13, 2009 @4:00 pm

    The best information i have found exactly here. Keep going Thank you

  5. KonstantinMiller  •  Jul 6, 2009 @2:49 pm

    Hello. I think the article is really interesting. I am even interested in reading more. How soon will you update your blog?



Switch to our mobile site