CleanMate

All guides · macOS and Ubuntu · Updated

How to find large files on a Mac and on Ubuntu: Finder, du, find, ncdu and Baobab

Find what fills your disk on macOS and Ubuntu: Finder searches by size, Storage settings, du and find commands (with the BSD and GNU differences), ncdu and Disk Usage Analyzer, and what is safe to delete once you have found it.

Download for macOS · Install on Ubuntu — free and open source

CleanMate Large & Old Files on a Mac, listing big files with their size, kind and last useCleanMate Large & Old Files on a Mac, listing big files with their size, kind and last use

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

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):

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.

Looking for a free DaisyDisk alternative? See how Space Lens compares, feature by feature.

Looking for a free BuhoCleaner alternative? See how CleanMate compares, feature by feature.

Looking for a free MacCleaner Pro alternative? See how CleanMate compares, feature by feature.

Skip the commands

CleanMate runs on both systems: pick yours.

Open source — star it on GitHub: CleanMate for macOS · CleanMate for Ubuntu

How CleanMate decides what is safe to remove →