macOS

Disk Cleanup in macOS: A Step-by-Step Guide to Freeing Up Space

In this guide, you'll learn how to clean your Mac's disk using built-in tools and third-party applications. We'll help you free up gigabytes of space without losing important data.

Updated at February 16, 2026
15-30 minutes
Medium
FixPedia Team
Применимо к:macOS 12 MontereymacOS 13 VenturamacOS 14 Sonoma

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.

  1. Open System SettingsStorage (in newer versions it may be under General or Storage).
  2. Click Manage Storage.
  3. Wait for the analysis to complete. The system will group files by category: Applications, Documents, Downloads, Trash, System Files, etc.
  4. 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

  1. In Finder, click GoGo to Folder (or press Cmd+Shift+G).
  2. Enter ~/Library/Caches and press Go.
  3. Delete the contents of folders inside Caches (not the folder itself). You can drag files to the Trash.
  4. Similarly, navigate to ~/Library/Logs and delete old logs.

Clear System Cache (requires administrator password)

  1. Navigate to /Library/Caches (via "Go to Folder" without ~).
  2. 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 -rf command permanently deletes files. Ensure you have specified the correct paths. Before running system commands (with sudo), 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

  1. Open the Downloads folder in Finder.
  2. Sort files by size (View → Show View Options → Size).
  3. 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

  1. Open Mail.
  2. From the menu, select MailboxRemove Attachments.
  3. 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:

  1. Open Terminal.
  2. 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.

  1. Open Manage Storage again and check free space.
  2. If the difference is insignificant, restart your Mac—this updates disk space information and terminates processes holding files.
  3. 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 sudo in 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.

F.A.Q.

Is it safe to delete cache on Mac?
How to remove photo duplicates without losing originals?
Can disk cleanup be automated?
What to do if disk space isn't freed after cleanup?

Hints

Analyze disk usage
Clear cache and temporary files
Remove unnecessary downloads and duplicates
Clear email attachments and backups
Check results and restart Mac

Did this article help you solve the problem?

FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community