DEV Community

Cover image for How to find what's taking up space on your Mac
Hanako H.
Hanako H.

Posted on

How to find what's taking up space on your Mac

The warning says your disk is almost full, and System Settings > General > Storage isn't much help. It sorts everything into Applications, Documents, iOS Files and a large grey bar called System Data, which is often the biggest one and the one you can't open. To free real space you need folder names and sizes, not categories. On most Macs that have run out of room, the space is in a handful of folders nobody opens on purpose: old iPhone backups, AI model caches, a macOS installer in Downloads, developer build caches.

The walkthrough below uses the Disk screen in the osFoundry desktop app, which scans a folder on your own computer and draws it as a map where each box is as big as the space it takes. The same checks work with du in Terminal or any disk map tool. The screenshots show a sample home folder on a 256 GB MacBook with 3 GB left, not a real person's machine.

Scan your home folder, hidden files included

Open Disk and leave the location on Home. Keep Hidden files ticked. Several of the largest folders on a Mac start with a dot or live in ~/Library, which Finder hides by default, and that is a large part of why System Data looks so big and so mysterious.

The scan runs on the computer and nothing about your files is uploaded, which matters if the folder holds client work or personal photos (how osFoundry keeps data local). It also counts the space each file really occupies on the disk rather than the file length that Finder's Size column shows. The two usually agree, but not always, and the difference is covered at the end.

Look for the biggest box you don't recognise

In the map every box is a folder and its area is its size, so you read it by size, not by name. In the sample scan the largest single box is Library/Application Support/MobileSync/Backup, 42.5 GB, last written two years ago.

The sample home folder as a map: the iPhone backup folder selected, 42.5 GiB, last written 2 years ago

That folder holds iPhone and iPad backups made through Finder. Every device you've ever backed up to that Mac keeps its own subfolder, and replacing a phone doesn't remove the old one. If your phone backs up to iCloud now, the local copies are usually just history. You can also delete them from Finder: select the iPhone in the sidebar, click Manage Backups, and remove the old ones there.

Mark it (space bar, or Mark for review) and keep going. Nothing is deleted at this stage.

Open the folders that look small from the outside

Double-click a box to zoom into it. Big files are often buried a few levels down inside a folder whose name tells you nothing, and this is where a map helps the most.

In the sample, .cache holds 39 GB, almost all of it in huggingface/hub. That's where Python tools that download AI models keep the files, and a model you tried once stays there until you remove it. Here a Llama 2 13B chat model takes 24.3 GB.

Inside .cache/huggingface/hub: a Llama 2 13B model folder, 24.3 GiB, last written 10 months ago

The other usual suspects:

  • Downloads/InstallAssistant.pkg or Install macOS ….app in Applications. A full macOS installer is about 12 GB and is no longer needed once the update is installed.
  • Library/Developer/Xcode/DerivedData. Xcode rebuilds it on the next build, so deleting it costs only build time.
  • Library/Caches. Apps recreate these, but clearing an app's cache while it's running can log you out or slow it down for a while.
  • Movies and Library/Messages/Attachments. These are your own files, so check them before you remove anything.

Switching the map from Size to Age weights each box by its size and how long ago it was last written, which brings large, forgotten folders forward.

Review the list, then use the Trash

When you're done, open the review list. It shows every marked item with its full path and size, so you can check that Backup really is the iPhone backup folder and not something with the same name.

Review marked items: three paths, 79.1 GiB selected, Move to Trash

Move to Trash sends the items to the Mac's Trash rather than deleting them. The app refuses to move your home folder, the folder you scanned, or the top level of a drive, and it won't take a selection where one marked folder sits inside another. The space only comes back when you empty the Trash, so you can still drag something back out if you change your mind.

If the free space doesn't change after emptying the Trash, local Time Machine snapshots may still be holding the deleted files. tmutil listlocalsnapshots / in Terminal lists them, and macOS removes them on its own when it needs room.

Why your numbers and Finder's may differ

Finder's Size column shows a file's length (Get Info shows both, as "on disk" in brackets). Disk tools that count blocks show how much of the disk the file actually uses. A 2-byte text file still takes a whole 4 KB block on APFS, and a disk image can claim gigabytes while holding almost nothing. The Apparent size option switches the map to Finder's way of counting. For freeing space, the block count is the closer guide to what you'll get back. One case fools both: a file duplicated in Finder on APFS is a clone that shares its blocks with the original, so each copy shows its full size but deleting one frees almost nothing.

The app is free from the osFoundry download page for macOS, Windows and Linux.

Top comments (0)