Easy Mac Cleaning
Jeremy •
Mac, Tips •
Like everything else, computers get messy! Even Macs. However, it turns out there are 3 little scripts hiding in your Mac that are intended to periodically clean your system. The problem is if you use a laptop they probably never get run. They're scheduled to run in the middle of the night and laptops are rarely left on overnight.
Whenever my Mac seems like it's getting a little sluggish I run these scripts. It may all be in my head, but I feel like the system is a bit more responsive after having run them. Here's how:
- Open a terminal (for those of you that don't spend your days in a terminal like I do, open Finder, go to Applications > Utilities, and double-click Terminal)
- Type:
sudo periodic daily
and hit return (it will ask you to enter your password). - Type:
sudo periodic weekly
and hit return (this one might take a few minutes). - Type:
sudo periodic monthly
and hit return.
It's that easy! If you're interested, read more for quick descriptions of what they do.
Daily
- Removes long-lived system log files
- Removes temporary junk files.
- Removes system messages older than 21 days.
- Does some account and security auditing
- Rotates Log files
- Deletes all system warning and info messages older than a few days.
Weekly
- Rebuilds the
locatedatabase (this is what causes the weekly task to take a few minutes). - Rebuilds the
whatisdatabase. - Rotates the logs
Monthly
- Performs login accounting
- Rotates Log files
