Introduction / Why This Is Needed
Over time, macOS accumulates a large number of temporary files, cache, unnecessary installers, and duplicates, which can occupy tens of gigabytes. Regular cleanup not only frees up space for new files but can also slightly speed up system performance. This guide will help you safely find and remove hidden "junk" without risking important data.
What You'll Get:
- Fast space freeing from 5 to 50+ GB depending on how full your drive is.
- Understanding of macOS storage structure and what can be safely deleted.
- A skill for regular disk maintenance to sustain performance.
Requirements / Preparation
Before starting, ensure that:
- You have a backup of important data (via Time Machine or manually).
- You are logged in as an administrator (required to access some system folders).
- macOS is updated to the latest stable version (Sonoma, Ventura, or Monterey).
- Close all unnecessary applications, especially those actively using the disk (e.g., torrents, video editors).
⚠️ Important: Do not delete files from system folders (
/System,/usr,/bin) unless you are 100% sure of their purpose. Follow the instructions below.
Step-by-Step Guide
Step 1: Analyze Disk Usage
First, you need to understand what is occupying space.
- Open Apple menu (🍎) → About This Mac → Storage. Here, macOS will show an approximate distribution by categories: "Applications", "Documents", "System", "Other", etc.
- Click "Manage..." for a detailed analysis. The system will suggest automatic optimization options:
- "Store in iCloud" — moves files to the cloud.
- "Optimize Storage" — removes movies and TV shows you've already watched.
- "Automatically empty Trash" — deletes files in the Trash older than 30 days.
- "Reduce Clutter" — converts video to a more efficient format.
- Manually check large files:
- Open Finder.
- Press Cmd+F to search.
- In criteria, select "Size" → "is larger than" and enter, for example,
1 GB. - Add a criterion "Date Modified" → "is before" and set a date, or choose "All".
- The system will show the largest files. Review them and delete unnecessary ones.
Step 2: Clearing Application Cache
Cache consists of temporary files to speed up operations. They can be safely deleted.
2.1 Clearing Browser Cache (Safari, Chrome, Firefox)
Safari:
- Safari → Settings → Advanced → Check "Show Develop menu in menu bar".
- In the Develop menu → Clear Caches.
- Or manually:
~/Library/Caches/com.apple.Safari/Cache.db(delete theCache.dbfolder).
Google Chrome:
- Chrome → Settings → Privacy and security → Clear browsing data.
- Select "Cached images and files" → "Clear data".
Firefox:
- Settings → Privacy & Protection → Cookies and Site Data → "Clear Data" → check "Cached Web Content".
2.2 Clearing System and User Cache
Caution: Delete only the contents of Caches folders, not the folders themselves.
- Open Finder → Go (in the menu) → Go to Folder... (Cmd+Shift+G).
- Enter
~/Library/Cachesand press Enter. - Review application folders (e.g.,
com.apple.Safari,com.spotify.client,com.adobe.*). You can delete everything inside these folders (files and subfolders), but do not delete theCachesfolder itself. - For system cache (requires admin password), go to
/Library/Caches(without~). Delete only files, not folders with names likecom.apple.
Example Terminal command for quick user cache cleanup:
# Delete contents of all user cache folders (without deleting the folders themselves)
find ~/Library/Caches -type f -delete
find ~/Library/Caches -type d -empty -delete
💡 Tip: After clearing the cache, applications may take slightly longer to launch the first time — this is normal.
Step 3: Removing Unnecessary Downloads and Duplicates
3.1 "Downloads" Folder
Open the Downloads folder in Finder (~/Downloads). Delete:
.dmginstaller files for already installed programs.- Archives
.zip,.dmg,.pkgthat are no longer needed. - Old documents, screenshots, videos.
3.2 Finding Duplicates and Large Files
Use built-in tools or third-party apps (e.g., Duplicate Cleaner, Gemini 2):
- Finder: search by file type (e.g.,
kind:imageorkind:video) and sort by size. - Photos: if using a library in "Photos", check the "Duplicates" section — duplicates may be there.
Step 4: System and Local Backup Cleanup
4.1 Deleting Old macOS Installers
The /Applications folder often contains Install macOS [Name].app. If you've already updated, delete old installers (typically 6-12 GB each).
4.2 Deleting iOS/iPadOS Backups
- System Settings → General → Storage → Manage Storage.
- Select "Backups".
- Delete old backups of devices you no longer use.
4.3 Cleaning Up Locales and Language Packs (Optional)
If you don't use other languages, you can remove their language packs:
# List installed language packs
ls /System/Library/Frameworks/ | grep -i lproj
# Remove unnecessary ones (e.g., Spanish) - ONLY if you are sure!
# sudo rm -rf /System/Library/Frameworks/Foundation.framework/Versions/C/Resources/es.lproj
⚠️ Caution: Do not delete system locales without understanding the consequences. Skip this step if unsure.
Step 5: iCloud and Photos Optimization
5.1 Photos
- Open the Photos app → Settings (or "Photos" → "Settings" in the menu).
- Enable "Optimize Mac Storage". This will store low-quality previews on your Mac while keeping originals in iCloud.
- Delete unwanted shots in the "Recently Deleted" section (they are stored for 30 days before permanent deletion).
5.2 iCloud Drive
- System Settings → your name → iCloud.
- Click "Manage" next to "iCloud Drive".
- Disable sync for apps you don't use (e.g., "Pages", "Keynote" if you don't work in them).
- On Mac: open the
~/Library/Mobile Documents/folder — iCloud Drive data is stored here. Delete unnecessary app folders.
Verifying Results
- Open Apple menu → About This Mac → Storage again and compare the numbers before and after.
- Use Disk Utility (
/Applications/Utilities/Disk Utility.app):- Select your main disk (usually "Macintosh HD").
- Click "Show Info" — check "Available".
- Ensure the system runs stably: launch a few apps, open a browser with multiple tabs.
Potential Issues
Issue: "Insufficient permissions to delete files"
Solution: Some files in /Library or ~/Library may be protected. Use the admin password when prompted. In Terminal, prepend sudo to the rm command (e.g., sudo rm -rf /path/to/file), but be extremely careful.
Issue: "App won't launch after cache cleanup"
Solution: Restart your Mac. The app will recreate its cache automatically. If the problem persists, restore the cache from a Time Machine backup.
Issue: "System shows 'Other' as a huge category, but I don't see large files"
Solution: "Other" includes:
- Virtual machine files (Parallels, VMware).
- Mail cache.
- Databases (e.g., SQLite for apps).
- Documents in formats unrecognized by Finder (e.g.,
.ipa,.xcarchive). Use this Terminal command to find large files:
# Find files larger than 500 MB in your home folder
find ~ -type f -size +500M -exec ls -lh {} \; | awk '{ print $5, $9 }' | sort -rh
Issue: "Space fills up again quickly"
Solution: Check:
- Background processes: Activity Monitor → "Disk" tab — are there processes constantly writing to disk?
- iCloud sync: if "Optimize Storage" is enabled but you frequently edit videos/photos, originals will re-download.
- Rogue apps: some applications (e.g., torrent clients, screen recording tools) create temporary files. Configure them to clean up after tasks.