How to Clean "Other" Storage on MacBook Pro Through Terminal

April 5, 2025
5 min read
By Rahul Mishra
MacBook Pro on desk

Over time, your MacBook Pro can accumulate a variety of files, causing your storage to fill up quickly. A significant portion of this storage might fall under the "Other" category, which includes system files, temporary files, caches, logs, and more. While there are built-in tools and third-party apps to help you manage storage, using Terminal commands can offer a more powerful and efficient way to clean up your Mac.

Understanding 'Other' Storage on Mac

Before we dive into the cleaning process, it's essential to understand what "Other" storage includes:

  • Caches: Temporary files created by the system and apps to speed up processes
  • Logs: Files that record system activities and errors
  • System files: Includes settings, temporary files, and application support files
  • Backups: iOS device backups, including apps like iTunes and Finder backups
  • Browser cache: Stored files from web browsing

While these files are necessary for your system to function smoothly, they can pile up and take up a significant amount of space. The goal here is to remove unnecessary files without harming your system's integrity.

Steps to Clean 'Other' Storage Using Terminal

1. Clear System Caches

System caches can occupy a large portion of your disk. Clearing them can free up space without affecting essential files.

Clear system-wide caches:

sudo rm -rf /Library/Caches/*

Clear user-specific caches:

rm -rf ~/Library/Caches/*

2. Remove Log Files

Log files track system operations and errors. While useful for troubleshooting, they can become massive over time.

Clear system logs:

sudo rm -rf /var/log/*

Clear user logs:

rm -rf ~/Library/Logs/*

3. Find and Delete Large Files

You might have large, forgotten files taking up space. Use the find command to locate them:

sudo find / -type f -size +1G

4. Clear Browser Cache

Clear Safari cache:

rm -rf ~/Library/Caches/com.apple.Safari/*

Clear Chrome cache:

rm -rf ~/Library/Application\ Support/Google/Chrome/Cache/*

5. Delete Old iOS Backups

rm -rf ~/Library/Application\ Support/MobileSync/Backup/*

6. Empty Trash

rm -rf ~/.Trash/*

Final Thoughts: Be Cautious

Important Safety Notes:

  • Using Terminal commands to clean up storage can be powerful, but it's also potentially risky
  • Some commands like rm -rf will delete files permanently without warning
  • Double-check before executing commands
  • If you're unsure, back up your data before performing extensive cleanups

Cleaning up "Other" storage through Terminal provides a fast, efficient way to free up space on your MacBook Pro, and it's especially helpful when built-in tools like Disk Utility or Storage Management don't provide enough control over file management.

MacBookTerminalStorageTips

Related Articles

Top Chrome Extensions Every Web Developer Should Know

Top Chrome Extensions Every Web Developer Should Know

Essential Chrome extensions to enhance your web development workflow.

Read More