How to Sort and Clean Up Desktop Icons on Mac
A messy desktop has a two-second fix and a permanent one, and they live in the same right-click menu. Clean Up By straightens things once; Sort By keeps them straightened forever; and View Options controls the grid everything snaps to. Knowing which is which is the whole game.
One-time tidy: Clean Up and Clean Up By
Right-click any empty desktop area (or click the desktop and use Finder's View menu):
- Clean Up — nudges every icon onto the nearest grid slot. Nothing is reordered; overlaps and crooked rows just get squared up.
- Clean Up By → Name / Kind / Date Modified / Date Created / Size / Tags — sorts the icons once, filling the grid from the top right of the desktop, column by column. Tomorrow's new files land wherever they please; the sort doesn't persist.
Clean Up By is the tool for the weekly reset: everything lines up, and you can still drag icons anywhere afterwards. If a stray icon refuses to join the grid, it's usually mid-drag from an earlier session — click it once and run Clean Up again.
Permanent order: Sort By
In the same right-click menu, Sort By is the standing rule:
- Pick Kind, Name, Date Added, or another key, and the desktop reorders itself continuously. Every screenshot, download, and saved file snaps into its sorted position the moment it arrives.
- The trade-off: you can no longer freely place icons. Drag one to a corner and it jumps straight back to its sorted slot. That's the feature working, not a bug.
- Want free placement with tidiness? Choose Sort By → Snap to Grid — icons stay where you put them but always align to the grid.
- To turn the standing rule off, set Sort By → None. Icons keep their current spots and become draggable again.
Kind is the most useful key for real desktops: images cluster with images, PDFs with PDFs, folders together — which is also exactly what Stacks does, more compactly.
Tune the grid itself
Right-click the desktop and choose Show View Options (or press Cmd + J):
- Grid spacing — the slider that stops labels overlapping. Tighter spacing fits more icons; looser keeps long filenames readable.
- Icon size — smaller icons plus tight spacing can double what a desktop holds.
- Sort by lives here too, as a dropdown — same setting as the right-click menu, labelled Keep arranged by in spirit: set it and the desktop stays sorted.
These controls work identically on Ventura, Sonoma, and Sequoia.
The honest hierarchy
Clean Up for the quick fix. Clean Up By when you want today's mess sorted but tomorrow's freedom kept. Sort By when the desktop should police itself. And when even sorted icons are too many icons, let macOS fold them into piles by kind automatically — that's Stacks, one entry up in the same menu.
When icons misbehave anyway
- Everything vanished: a suddenly empty desktop is almost never a sorting problem — check whether iCloud's Desktop & Documents syncing relocated your files (the desktop-in-iCloud mystery), or whether Stage Manager is hiding desktop items.
- Icons reflow after unplugging a monitor: resolution changes re-wrap the desktop grid. With Sort By active the order is deterministic and everything lands back predictably; with free placement, macOS does its best and often loses your arrangement — another argument for at least Snap to Grid. Displays you reconnect at the same resolution restore cleanly.
- The desktop stops responding to clicks: the desktop is drawn by Finder, and Finder can wedge like any app. Relaunch it harmlessly with
killall Finderin Terminal — it restarts itself within a couple of seconds — or hold Option while right-clicking Finder's Dock icon and choose Relaunch.
While you're tidying, Mainspring turns 90+ hidden macOS settings — Finder, desktop, Dock, and more — into labelled, reversible toggles. Flip, compare, keep what works.
Try Mainspring free →Signed & notarized by Apple · 1-day free trial · $29 once
Beyond sorting: fold the pile
Sorting arranges the clutter; Stacks makes it disappear into self-organizing piles that expand on click: desktop Stacks explained.