A disk rarely fills up evenly. Most of the time a handful of files — a forgotten video export, disk images and installers in Downloads, a virtual machine, an old backup — take more space than everything else together. This guide shows how to find them on a Mac and on Ubuntu, first with the tools already on your computer, then in the terminal, and what to check before you delete anything. To find which folder, not which file, fills the disk, including the system folders outside your home, see find what is using disk space from the terminal.
On a Mac, without the terminal
Finder search by size. Open a Finder window, press ⌘F, set the search to This Mac (or the folder you want), click the first criterion and pick Other… › File Size, then is greater than 1 GB. Add Last opened date to see what you haven’t touched in months.
Storage settings. System Settings › General › Storage lists categories; the ⓘ next to Documents opens Large Files, Downloads and Unsupported Apps, sorted by size, with a delete button. What you delete there skips the Trash, so look before you click.
In the terminal (Mac and Ubuntu)
Start with the free space, then the biggest folders in your home folder, hidden ones included:
df -h ~ # free space on the disk that holds your home folder
du -h -d 1 ~ 2>/dev/null | sort -h | tail -20 # the 20 biggest folders in your home folder
du -d 1 works with both macOS (BSD) and Ubuntu (GNU) du; GNU also knows it as --max-depth=1. Go one folder deeper where the space is (du -h -d 1 ~/Movies …) until you find the culprit. In the current folder, du -sh * | sort -h gives the same list for visible items only.
To list single files over a size, anywhere in your home folder:
find ~ -xdev -type f -size +1G -exec ls -lh {} + 2>/dev/null
find ~ -xdev -type f -size +500M -mtime +180 -exec ls -lh {} + 2>/dev/null # over 500 MB, not modified for 6 months
The M and G suffixes work in both versions of find. -xdev keeps the search on one disk, so a mounted USB drive or network share is not crawled. On a Mac, folders macOS protects (Mail, Messages, Photos libraries, other apps’ containers) print “Operation not permitted” unless Terminal has Full Disk Access — see Full Disk Access on macOS. The 2>/dev/null hides those messages.
Outside your home folder, Ubuntu’s usual suspects are /var/log, /var/lib/snapd, /var/lib/docker and /var/lib/flatpak; read them with sudo du -h -d 1 /var | sort -h. Deleting there belongs to the tools that own them (journalctl --vacuum-size, snap remove, docker system prune), not to rm.
ncdu and Disk Usage Analyzer (Baobab)
ncdu is a terminal browser: it scans a folder once, then lets you move through it biggest first with the arrow keys.
sudo apt install ncdu # Ubuntu
brew install ncdu # Mac, with Homebrew
ncdu -x ~ # -x: stay on this disk
Press d to delete the selected item — for good, without the Trash — so use ncdu to look, and delete with care.
On Ubuntu, Disk Usage Analyzer (Baobab) is installed with the desktop: open it, pick your home folder or a drive, and it draws a ring chart you can click into. It also moves items to the Trash from the right-click menu. Comparing visual tools — Baobab, DaisyDisk, GrandPerspective, Filelight and CleanMate’s Space Lens — is on the compare page.
What you usually find, and whether to delete it
- Downloads: disk images (
.dmg,.iso), installers and archives you already used. Safe to delete. - Videos and screen recordings: move them to an external drive first if you want to keep them.
- Virtual machine disks (
.vmdk,.vdi,.qcow2, UTM, Parallels): delete the VM from its app, not the file by hand. - Developer folders:
node_modules, build output, simulators, Docker images. Each has a cleaner way; see node_modules and build folders and Docker. - Mail attachments on a Mac live inside the Mail folder, not in Downloads; see Mail attachments on a Mac.
- The same file twice: see finding and deleting duplicate files.
Prefer the Trash over rm for your own files: Finder (⌘⌫) and Ubuntu’s Files both move to the Trash, so a mistake costs nothing until you empty it. Then empty the Trash — the space only comes back after that.
How CleanMate does it
CleanMate has two views for this, on both platforms (see all macOS features and all Ubuntu features):
- Space Lens shows your home folder — or any folder or drive you pick — sorted by size, measured like
du; click a folder to go deeper. On the Mac it also draws a donut chart of the folder’s contents. - Large & Old Files lists your biggest files with filters for minimum size and how long they have been unused (and, on the Mac, kind: video, archive, disk image, installer…). It scans your home folder, a folder you choose or an external drive.
- Files you pick go to the Trash after a confirmation — on an external drive, to that drive’s own Trash, so the space comes back there — and Undo puts them back. Nothing is selected for you, and folders you exclude in Settings (Exclusions on the Mac, Never clean on Ubuntu) are left out.
- A file that has other hard links is marked on the Mac, because moving it frees no space.
Download CleanMate — free and open source.
One place big files hide in plain sight: a full Time Machine backup drive, where every old backup keeps its own copy.
And photos that merely look alike are a different case from identical copies: similar photos and burst shots.
FAQ
Why does Finder show less free space than df? Finder counts space macOS can free on its own (purgeable: local Time Machine snapshots, iCloud files that can be downloaded again) as available. df does not.
I deleted a big file and nothing changed. Empty the Trash. If the file was a hard link, another name for the same data still exists; on a Mac, a Time Machine local snapshot may hold it until the snapshot expires.
Is sudo du on / safe? Reading is safe. Deleting outside your home folder can break the system: use the owning tool (apt, snap, journalctl, docker) instead.

