Introduction / Why This Is Needed
Over time, your Mac's disk fills up with temporary files, cache, duplicates, and unnecessary downloads. This not only reduces free space but can also slow down your system. In this guide, you'll learn how to safely and effectively clean your disk, freeing up gigabytes of space and improving your Mac's performance. We'll cover both built-in macOS tools and trusted third-party utilities.
Requirements / Preparation
Before you begin, ensure that:
- You have one of the supported macOS versions installed (12 Monterey, 13 Ventura, 14 Sonoma).
- You are logged into an account with administrator privileges (some actions may require this).
- You have backed up important data (e.g., via Time Machine) to avoid accidentally deleting necessary files.
- You have closed all unnecessary applications to free up temporary files they are using.
Step 1: Analyze Disk Usage
First, you need to understand what is taking up space on your disk. macOS provides a convenient tool for this.
- Open System Settings → Storage (in newer versions it may be under General or Storage).
- Click Manage Storage.
- Wait for the analysis to complete. The system will group files by category: Applications, Documents, Downloads, Trash, System Files, etc.
- Pay attention to categories with the largest volume. For example, "Downloads" or "Documents" often contain large files that can be deleted.
💡 Tip: Click on a category to see details. In the "System Files" section, you can find large updates, cache, and temporary data.
Step 2: Clear Cache and Temporary Files
Cache and temporary files accumulate quickly and can occupy gigabytes. You can delete them manually or via Terminal.
Clear User Cache
- In Finder, click Go → Go to Folder (or press
Cmd+Shift+G). - Enter
~/Library/Cachesand press Go. - Delete the contents of folders inside
Caches(not the folder itself). You can drag files to the Trash. - Similarly, navigate to
~/Library/Logsand delete old logs.
Clear System Cache (requires administrator password)
- Navigate to
/Library/Caches(via "Go to Folder" without~). - Delete files inside, but be careful: do not delete folders if you are unsure.
Use Terminal for Quick Cleaning
Open Terminal and run the following commands (one at a time):
# Clear user cache
rm -rf ~/Library/Caches/*
# Clear system update cache
sudo rm -rf /Library/Updates/*
# Clear temporary files
rm -rf /private/tmp/*
⚠️ Important: The
rm -rfcommand permanently deletes files. Ensure you have specified the correct paths. Before running system commands (withsudo), enter your administrator password.
Step 3: Remove Unnecessary Downloads and Duplicates
The Downloads folder often becomes a dumping ground for unused files. Duplicates of photos, documents, and music can also take up significant space.
Clean the "Downloads" Folder
- Open the Downloads folder in Finder.
- Sort files by size (View → Show View Options → Size).
- Delete large files that are no longer needed. Don't forget to empty the Trash after deletion.
Find and Remove Duplicates
macOS does not have a built-in tool for finding duplicates, but you can use:
- Photos: If you use Apple Photos, it can find duplicates via "File" → "Find Duplicates."
- Third-party apps: Duplicate Cleaner, Gemini 2, or free alternatives. They scan specified folders and show files with identical content.
- Manually: In Finder, you can search by name and size, but this is time-consuming.
💡 Tip: Before deleting duplicates, ensure you keep the originals. Some apps allow you to preview files before deletion.
Step 4: Clean Email Attachments and Backups
Email clients (Mail, Outlook) store attachments locally, and Time Machine may create local snapshots that occupy space.
Remove Attachments from Apple Mail
- Open Mail.
- From the menu, select Mailbox → Remove Attachments.
- Choose to remove all attachments or only old ones.
Clean Local Time Machine Snapshots
Time Machine creates local snapshots for quick recovery, but they can grow. To delete them:
- Open Terminal.
- Run:
# List snapshots
tmutil listlocalsnapshots /
# Delete all local snapshots (careful!)
sudo tmutil deletelocalsnapshots <snapshot_date>
Or simpler: temporarily disable Time Machine, then re-enable it—the system will automatically delete old snapshots.
Delete Old iOS Backups
If you have device backups in ~/Library/Application Support/MobileSync/Backup/, check and delete unnecessary ones.
Step 5: Use Third-Party Utilities for Deep Cleaning (Optional)
For comprehensive cleaning, you can use trusted applications. They automatically find and remove unnecessary files, including hidden system data.
Popular options:
- CleanMyMac X: user-friendly interface, modules for cleaning cache, duplicates, unused language packs, etc.
- DaisyDisk: visual disk usage representation with quick deletion capability.
- OnyX: free utility for performing system tasks, including cleaning.
⚠️ Important: Third-party apps require trust. Download only from official websites and verify they are developer-signed. Before cleaning, review the list of files scheduled for deletion.
Step 6: Check Results and Restart Your Mac
After all actions, verify that space has been freed up.
- Open Manage Storage again and check free space.
- If the difference is insignificant, restart your Mac—this updates disk space information and terminates processes holding files.
- Check the Trash—you may have forgotten to empty it.
Potential Issues
"Operation not permitted" Error When Deleting Files
If you see "Operation not permitted," the file may be protected or in use by another process. Try:
- Close all applications that might be working with these files.
- Use the administrator password for system files (via
sudoin Terminal). - Restart your Mac and attempt deletion again.
Accidentally Deleting Important Files
If you accidentally delete something important, restore it from a Time Machine backup or use data recovery utilities (Disk Drill, Data Rescue). Act quickly to avoid disk overwriting.
Space Not Freed After Cleaning
Sometimes the system caches information. Restart your Mac. If the problem persists, check if the disk is being refilled with new data (e.g., application logs). You can use a Terminal command to monitor:
sudo fs_usage | grep -e "WRITE" | tail -10
This will show which processes are actively writing to the disk.
Third-Party Apps Fail to Delete Files
Some utilities require full disk access (in System Settings → Privacy & Security → Full Disk Access). Ensure you have granted the necessary permissions.