Introduction / Why This Is Needed
Over time, macOS accumulates a large number of temporary files, caches, installation packages, and other unnecessary data that can occupy tens of gigabytes. Regular cleanup not only frees up space for new files but can also improve overall system performance. This guide will help you safely and efficiently clean macOS of system junk without using third-party software.
Requirements / Preparation
- macOS Sonoma 14, Ventura 13, or Monterey 12.
- Administrator privileges (for removing system caches).
- A backup of important data (recommended via Time Machine).
- Sufficient time (15–30 minutes depending on the volume of data).
Step 1: Analyze Disk Usage
First, you need to understand what exactly is taking up space on your disk.
- Open System Settings → General → Storage.
- Wait for macOS to analyze the disk contents (this may take a few minutes).
- Review the categories: Applications, Documents, System Data, Caches, and others. Hover over each category to see the exact size.
- Click Recommendations to get automatic cleanup suggestions (e.g., "Optimize Storage" for iTunes movies).
💡 Tip: Pay special attention to the "Other" (System Data) category. It often contains large files from virtual machines, caches, and temporary data that can be safely removed.
Step 2: Clear System Caches
Caches are temporary files that applications save for faster operation. Deleting them is safe but may cause a slight slowdown the first time you launch programs after cleanup.
Method A: Through Finder (Recommended)
- In Finder, click Go → Go to Folder (or press
Cmd+Shift+G). - Enter
~/Library/Cachesand click Go. This is the current user's cache folder. - Open each folder named after an application and delete the files inside (do not delete the application folders themselves, only their contents).
- Repeat for system caches: in the same dialog, enter
/Library/Caches(requires an administrator password). Delete the folder contents.
Method B: Through Terminal (For Advanced Users)
# Clear current user's caches
rm -rf ~/Library/Caches/*
# Clear system caches (requires sudo)
sudo rm -rf /Library/Caches/*
⚠️ Important: The
rm -rfcommand irreversibly deletes files. Ensure you are not deleting anything important. It's better to first check folder contents withls.
Step 3: Remove Unnecessary Downloads
The Downloads folder often becomes a collection point for old installation files .dmg, archives .zip, and media files.
- Open the Downloads folder via Finder (usually in the sidebar).
- Sort files by size (View → Show View Options → Size) or by modification date.
- Select old and unnecessary files and move them to the Trash.
- Don't forget to empty the Trash (right-click the Trash icon in the Dock).
Step 4: Clear Browser Caches
Browsers store huge amounts of data: cached images, scripts, and history. Clearing them can free up hundreds of megabytes.
- Safari: Safari → Settings → Extensions → Manage Website Data → Remove All.
- Google Chrome: Chrome → Settings → Privacy and security → Clear browsing data → Select "Cached images and files".
- Mozilla Firefox: Firefox → Settings → Privacy & Security → Cookies and Site Data → Clear Data → Select "Cached Web Content".
Step 5: Manage Backups
Delete Local Time Machine Snapshots
If Time Machine is enabled, macOS may save local snapshots to the internal disk when an external drive is unavailable.
- Open Terminal.
- Enter the command
tmutil listlocalsnapshots /to see a list of snapshots. - Delete old snapshots (e.g., from previous months) with the command:
For example:sudo tmutil deletelocalsnapshots <snapshot_date>sudo tmutil deletelocalsnapshots 2026-01-15-120000
Delete iOS Device Backups
- Open Finder.
- In the sidebar under Locations, find iPhone/iPad backups.
- Right-click an unnecessary backup → Delete Backup.
Step 6: Find and Delete Large Files
Locate the largest files you might have forgotten about.
- Open Finder.
- In the search bar, enter
*(just an asterisk) and press Enter. - In the top-right corner, click the "+" button (add criterion) → select "Size" → "is greater than" → enter
1 GB. - The system will show all files larger than 1 GB. Review them and delete unnecessary ones (old videos, virtual machines, software distributions).
Verify the Result
- Return to System Settings → Storage.
- Allow the system 5–10 minutes to recalculate.
- Ensure the total free space has increased and the "System Data" category has decreased.
- Check that key applications work correctly (especially those whose caches you deleted).
Potential Issues
Problem: Insufficient permissions to delete files in /Library/Caches
Solution: Use the sudo command in Terminal or authenticate as an administrator when attempting deletion via Finder.
Problem: Space not freed after cleanup
Solution: You may have only deleted links, not the actual files (e.g., in the case of symbolic links). Check if applications using those files are running (e.g., a virtual machine). Also check for local Time Machine snapshots (see Step 5)—they can occupy gigabytes.
Problem: System became slower after cleanup
Solution: This is temporary. Applications need to regenerate caches. Simply give the system 10–15 minutes to work.
Problem: Cannot delete file because it is in use
Solution: Close all applications that might be using the file (browsers, media players, editors). If that doesn't work, restart your Mac and try deleting the file again.
Additional Methods (Optional)
Using Third-Party Utilities
If manual cleanup seems complex, you can use trusted applications:
- OnyX — a free utility for performing system cleanup and maintenance tasks.
- CleanMyMac X — a paid app with a user-friendly interface for analyzing and removing junk.
Cleaning Old .pkg and .dmg Installers
Check the Downloads folder and the Applications folder for installer files you no longer use. They can be safely deleted after the corresponding software is installed.
Removing Old macOS Updates
If you upgraded macOS, the old Install macOS [Name].app file can occupy 6–8 GB in the Applications folder. Delete it if you don't plan to roll back the system.