Skip to content

Instantly share code, notes, and snippets.

@Orismann
Last active March 14, 2025 19:48
Show Gist options
  • Save Orismann/7d9ba47020d08525577ee0755c2816d3 to your computer and use it in GitHub Desktop.
Save Orismann/7d9ba47020d08525577ee0755c2816d3 to your computer and use it in GitHub Desktop.

Our lives are increasingly intertwined with technology, the storage space on our devices becomes a valuable commodity. Mac users often find themselves grappling with the perennial issue of managing storage space efficiently. Accumulated files, applications, and system clutter can clog up your Mac's storage, slowing down performance and hindering productivity.

In this guide, we'll use the built-in Terminal app to free up space on your Mac without using any third-party software.

1. Empty the Trash

Start by emptying the Trash. Even though this can be done through the Finder, you can also do it via Terminal using the rm command.

sudo rm -rf ~/.Trash/*

2. Remove System and User Cache Files

Clear system and user cache files, which can sometimes take up significant space.

sudo rm -rf /Library/Caches/*

rm -rf ~/Library/Caches/*/

3. Remove System and User Log Files

Log files can accumulate over time and consume a considerable amount of disk space, especially on systems with limited storage. Removing unnecessary log files can help free up space for other purposes, such as installing new applications or storing personal files.

sudo rm -rf /Library/Logs/* rm -rf ~/Library/Logs/*

Alternative Suggestion: Automatically Clean Massive Space with GUI App (More Safe and Save Time)

Not all people are willing to play with text command and sometimes it is more dangrous as the wrong input would bring severe issue to the underlaying operating system. It is more recommended for advanced users. If you want to try a safe and easy way to free space on a Mac, then go with a Mac cleaner app instead.

They will automatically locate all the junk and cache files on your Mac and you can delete GBs of free space in one click. The below screenshot is showing 28GB free space to be cleaned up with the help of CleanGeeker app, including application junk files, leftover files, system cache files, log files. This is much more user friendly approach to get more free space on your Mac.

CleanGeeker Download: https://www.tunesbro.com/downloads/CleanGeeker.dmg

CleanGeeker

@ishandutta2007
Copy link

My "other" part of drive is still huge, any more ideas ?

Screenshot 2024-10-07 at 2 29 46 PM

@Wiggie49
Copy link

Really a pain when working with 128GB SSD MacBook Air. Since using the CleanGeeker app, it becomes much faster to free space on my Mac as it automatically delete system cache and junk files. I do this once a week and easy enough to get more than 10GB additional space in one click!

@ivansavra1
Copy link

My "other" part of drive is still huge, any more ideas ?

Screenshot 2024-10-07 at 2 29 46 PM

Use DaisyDisk, it will show you the largest files and folders on your entire disk very quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment