Gerale Consulting Mac apps

How to free up disk space on a Mac

· Gerale Consulting

When the disk is nearly full, macOS can't install updates, apps struggle to save files and everything gets sluggish. Most of the space usually goes to a handful of predictable places. This guide goes through them in order, from the ones anyone can clear to the ones developers pile up, and for each one says where it is, how to remove it by hand and when that is safe.

Before you start, make sure you have a recent backup. Items you delete in the Finder go to the Trash, so you can change your mind until you empty it; commands such as rm -rf delete immediately, with no way back.

1. See what takes up space

Open Apple menu › System Settings › General › Storage (macOS 13 and later). The bar at the top splits the used space into apps, documents, photos, iCloud Drive, macOS and “System Data”. The ⓘ button next to each category shows what is in it: under Documents you find large files and downloads, under iOS Files the iPhone and iPad backups.

“System Data” is a catch-all for whatever macOS does not classify: caches, logs, local Time Machine snapshots, developer tools, virtual machines and more. Most of the steps below make it smaller.

In Terminal, this shows the size of every folder in your home, the biggest last:

du -hd1 ~ 2>/dev/null | sort -h

Run it again on a subfolder (for example ~/Library) to dig deeper. macOS may ask whether Terminal can access some folders: if you decline, they are simply left out of the count. To see everything, give Terminal Full Disk Access in System Settings › Privacy & Security.

2. Empty the Trash

Files you delete in the Finder stay in the Trash and keep taking space until you empty it: Finder › Empty Trash, or ⇧⌘⌫. In Storage settings you can turn on Empty Trash Automatically, which removes items that have been in the Trash for more than 30 days.

Some apps have a bin of their own: the Recently Deleted album in Photos and the Trash mailbox in Mail keep deleted items for a while longer.

Safe? Yes, as long as nothing in the Trash is still needed: once it is emptied, the files are gone.

3. Clear out Downloads and large files

The Downloads folder collects installers (.dmg, .pkg, .zip), videos and archives nobody opens again. In the Finder, open Downloads, choose View › as List and click the Size column to bring the biggest items to the top. For folders to show a size too, turn on View › Show View Options › Calculate all sizes.

To find large files anywhere, open a Finder window, press ⌘F, set the search criterion to the file size (if it is not in the menu, pick it from “Other…”) and choose “is greater than” 1 GB. In Terminal:

find ~ -type f -size +1G 2>/dev/null

Safe? An installer can go once the app is installed. For everything else, look before you delete: these are your own files and nothing re-creates them.

4. App caches and logs

Apps keep their caches in ~/Library/Caches: thumbnails, downloaded data, web content. In the Finder choose Go › Go to Folder… (⇧⌘G), type ~/Library/Caches and look for the biggest folders. In Terminal:

du -sh ~/Library/Caches/* 2>/dev/null | sort -h

Quit the app, then drag its folder to the Trash. Logs and crash reports live in ~/Library/Logs: they are usually small, but an app that misbehaves can fill them up quickly.

Safe? Yes, for third-party apps that are closed: caches are rebuilt, and the only cost is a slower first launch or some data the app downloads again. Leave the com.apple.* folders alone, don't delete the Caches folder itself, and stay out of /Library/Caches and /System: macOS manages them.

5. Old iPhone and iPad backups

When you back up an iPhone or iPad to the Mac (from the Finder, or iTunes on older systems), the whole backup is stored in ~/Library/Application Support/MobileSync/Backup: one folder per device, plus any backups you archived. A single backup can take many gigabytes, and the backups of phones you no longer own stay there for good.

To delete them, go to System Settings › General › Storage, click ⓘ next to iOS Files, select the old backups and click Delete. Or connect the device, select it in the Finder sidebar and use Manage Backups….

Safe? Only for backups you no longer need: a backup is the only copy of whatever is not in iCloud. Keep the latest backup of every device you use, unless it is already backed up to iCloud.

6. Xcode: DerivedData, simulators, DeviceSupport

If you develop for Apple platforms, Xcode collects a lot outside its own app, all of it in ~/Library/Developer. The short version:

Paths, commands and what you lose for each folder are in the Xcode cleanup guide.

7. node_modules folders

Every JavaScript project has its own node_modules folder with all its dependencies, and old projects keep theirs. To list them with their size (replace ~/Projects with the folder where you keep your code):

find ~/Projects -type d -name node_modules -prune -exec du -sh {} + 2>/dev/null | sort -h

Delete those of the projects you are not working on, by dragging them to the Trash or with rm -rf ~/Projects/old-app/node_modules. When you go back to a project, npm install (or pnpm install, yarn) recreates the folder.

Safe? Yes, if the project still has its package.json and lock file: the dependencies are downloaded again, at the exact versions of the lock file with npm ci. You need a network connection, and packages with native code are compiled again.

8. Docker

Docker Desktop, and alternatives such as OrbStack or Colima, keep images, containers, volumes and build cache inside a virtual disk. To see what takes the space:

docker system df

Then, from the safest to the most drastic (each command asks for confirmation):

docker builder prune        # build cache
docker container prune      # stopped containers
docker image prune -a       # images not used by any container
docker volume prune         # unused volumes (-a includes named ones): check first

Safe? Build cache and images are downloaded or rebuilt when needed, at the cost of time and bandwidth. A stopped container loses any change made inside it. Volumes are where databases and other services keep their data: delete one only if you know what is in it. Don't delete Docker's virtual disk file by hand: you would lose everything in it at once.

9. Package manager caches: npm, Homebrew, Gradle and others

Package managers keep a copy of everything they download, so that the next install is faster. These caches only ever grow:

Safe? Yes: whatever a project needs is downloaded again on the next build or install. The only cost is a slower first build, which needs a network connection.

10. Local AI models: Hugging Face, Ollama, LM Studio

Language and image models weigh several gigabytes each, and the ones you tried once are easy to forget.

Safe? Yes, they can be downloaded again, though big models take a while. First check that none of them is a model you fine-tuned or converted yourself: that copy exists only on your Mac.

11. Leftovers of apps you uninstalled

Dragging an app to the Trash removes the app, not its data. Settings, caches and documents stay in your Library, in folders named after the app or its bundle identifier (such as com.company.app):

Safe? Only for apps you are sure you won't reinstall: if you do, their settings and data are gone. Check that the folder doesn't belong to another app from the same developer that you still use (they often share folders), and never touch folders starting with com.apple.. macOS protects some of these folders and may ask for permission.

12. Time Machine snapshots and macOS installers

Two more things that end up in System Data:

The quick way: Vacuo

Vacuo, our app for macOS 14 and later, checks all these places in one scan and shows, category by category, what each item is, how much space it takes and whether it rebuilds itself or you should review it first. Nothing is selected for you: you tick what to remove and confirm. With the Move to Trash option on, files go to the Trash and you can change your mind until you empty it. Docker, simulators, Homebrew and Time Machine snapshots are removed with their own commands, the ones shown above.

The scan is free for every category, and the Trash, app caches, logs, old downloads, iPhone backups and large files can be cleaned for free too. Developer caches, Xcode, node_modules, Docker, AI models, app leftovers and system data need Vacuo Pro, a one-time purchase.

Discover VacuoDownload free

Read also