A ranked, honest walkthrough of where macOS disk space actually goes and how to reclaim it without breaking anything.
9 minutters læsning · Opdateret 8. september 2026
Vores artikler skrives kun på engelsk. Appen og resten af dette websted er fuldt oversat.
Almost every "my Mac is full" article opens with a list of things to delete. That order is backwards. On a 512 GB drive the difference between the biggest folder and the tenth biggest is usually 40 GB or more, so an hour spent emptying Downloads can be worth less than two minutes spent on one forgotten virtual machine image. Measure first, delete second.
macOS gives you a rough answer in Apple menu → System Settings → General → Storage. It is a good sanity check for the total and almost useless for finding the cause: it groups everything it does not recognise into "System Data", which on a developer machine is routinely 100 GB and which the panel will not let you open.
What you want instead is a size-ranked view of the actual directory tree — each folder shown in proportion to the bytes underneath it, so the problem is visible rather than deduced. A disk space analyzer does exactly that. On macOS the well-known ones are DaisyDisk, GrandPerspective, OmniDiskSweeper, DiskBuddy and our own app.
You can also do it from the terminal with no installation at all. The command below prints the twenty largest items directly inside your home folder. It is read-only and safe to run.
du -h -d 1 ~ 2>/dev/null | sort -rh | head -20du reports allocated blocks and cannot read folders macOS protects, so its total will not match Finder exactly. It is for ranking, not for accounting.
Across a lot of Macs the same directories come up again and again. In rough order of how much they tend to hold:
Do these in order. Everything here is either regenerable or something you explicitly chose to keep, and all of it can go to the Trash rather than being destroyed outright.
Empty the Trash first — it costs nothing and it makes every later number honest. Then sort Downloads by size in Finder (View → as List, then click the Size column) and delete the disk images and installers for software you have already installed; a .dmg you have already dragged into Applications has no further use.
Next, look at what iOS and Android development left behind if you do that work: Xcode DerivedData is entirely rebuildable, and unavailable simulator runtimes are dead weight. Both have their own article. Then check Docker, which does not shrink its disk image when you delete containers — you have to ask it to, from Docker Desktop → Settings → Resources, or with `docker system prune`.
Finally, look for single large files you had forgotten: video exports, virtual machine images (~/Virtual Machines, ~/Parallels), old project archives. One of these is often worth more than the entire rest of the list.
# What is in Downloads, largest first
du -h -d 1 ~/Downloads | sort -rh | head -20
# Docker reclaimable space (read-only)
docker system dfThese are bigger and are not automatically safe. Read each one before acting.
iCloud Drive "Optimise Mac Storage" (System Settings → [your name] → iCloud → iCloud Drive) evicts local copies of files that are already in the cloud, leaving a placeholder. This frees a lot of space quickly, but the files then need a network connection to open. Turn it on if your connection is reliable; leave it off if you work offline.
Photos, if it is set to "Download Originals to this Mac", holds every full-resolution photo and video locally. Switching to "Optimise Mac Storage" inside Photos → Settings → iCloud can free tens of gigabytes and is fully reversible.
Old iOS device backups sit in ~/Library/Application Support/MobileSync/Backup and are often several gigabytes each. Delete them from Finder → your device → Manage Backups, not by hand — deleting the folder directly can leave the sync database inconsistent.
Mail attachments live under ~/Library/Mail. The supported way to shed them is Mail → Settings → Accounts → Account Information → Download Attachments: "None". Mail re-downloads what you open. Do not delete files inside that directory by hand.
Never delete anything under /System, /usr (except /usr/local), /bin, /sbin or /private/var/db. macOS protects most of it, and the parts it does not protect are still load-bearing.
A few "tips" circulate that cost people data. Do not delete ~/Library wholesale, or any folder inside it whose purpose you cannot name — it holds your app preferences, mail, messages and keychain, not junk. Do not run `sudo rm -rf` against anything you have not read the contents of; there is no undo and there is no Trash. Do not delete files inside a .photoslibrary or .musiclibrary package; those are databases that break when you edit them from Finder.
Be sceptical of "cleaner" apps that offer to remove "system junk" without telling you which files. Any tool worth running shows you the full path list before it acts, and puts things in the Trash by default so a mistake is a drag away from being undone.
Disk pressure is a recurring condition, not a one-off event. Three habits do most of the work: set Finder → Settings → Advanced → "Remove items from the Trash after 30 days"; clear DerivedData and stale simulator runtimes after each major Xcode upgrade; and re-check the ranked view once a quarter rather than waiting for the "startup disk is almost full" dialog, which arrives when you have the least time to deal with it.
Dropit was built around that measure-first loop. Scanning your whole Mac and looking at it eight ways — treemap, sunburst, flame graph, bubbles, folder cards, top sizes, age map, mind map — is free and needs no account, and nothing about your files ever leaves the machine. The paid half is the part that acts: staging items for cleanup with a plain-English safety reason on each one, finding duplicates, uninstalling apps with their leftovers. If you would rather do everything above by hand, the free scan still tells you exactly where to point.
Keep at least 10–15% of the drive free. macOS uses free space for swap, snapshots and app updates, and below roughly 10 GB it starts refusing operations and slowing down noticeably.
Because of purgeable space. Time Machine local snapshots and cached iCloud files are counted as used by some tools and as available by others; macOS deletes them on demand when a write needs the room.
Mostly, but not blindly. Caches are regenerable by definition, so nothing is lost permanently, but quit the app first — deleting a cache under a running app can corrupt its state until relaunch.
The measurement half does; it is just arithmetic over the file system. Judge the deletion half by whether the tool shows you full paths before acting and uses the Trash by default.
Én betaling. Alle fremtidige opdateringer inkluderet. Virker på to af dine Mac-computere.
Hent