The Cleaner

Windows · macOS · Linux

The Cleaner removes caches, temporary files and logs that programs recreate when they need them. It only looks in places it knows, and shows you every file before it removes anything.

Using the Cleaner

The Cleaner page with the list of rules on the left and the results sorted by size on the right
What to clean on the left, what it would free on the right. Programs that are running are marked and skipped.
  1. Open the Cleaner page. Heft analyzes right away; this only reads, and takes a few seconds.
  2. Look over What to clean on the left. Each item shows how much it would free. Recommended ticks Heft's defaults (caches and temporary files only), and None clears everything.
  3. Click a row in the results to see exactly which files would be removed. Double-click a file to show it in Explorer (Finder on a Mac). Back to all results returns to the list.
  4. Press Clean and confirm.

Some items are marked in the list:

Your selection is remembered for next time. Programs that aren't installed are hidden, so the list only shows what's on your computer.

Cleaned files are deleted rather than moved to the Recycle Bin, because programs recreate them anyway and recycling caches would just move the clutter. The confirmation dialog says so.

What it covers

GroupExamples
SystemTemporary files, the Recycle Bin or Trash, thumbnail and shader caches, error reports and crash dumps, old logs. On Windows also Windows Update and Delivery Optimization downloads, setup logs and NVIDIA driver downloads. On macOS also Quick Look thumbnails, Metal shader caches, iPhone and iPad software updates, and system logs in /Library/Logs.
BrowsersChrome, Edge, Firefox, Brave, Vivaldi, Opera, Opera GX and Chromium, plus Safari on macOS. The cache is ticked by default. Cookies, history, form history and the last session are there too, each with a note on what you'd lose. Safari's cookies, history and last session are only listed when Heft has Full Disk Access.
ApplicationsDiscord, Slack, Teams, Spotify, Visual Studio Code, Cursor, Steam, Epic Games Launcher, JetBrains IDEs, Adobe and Java. On a Mac, new Teams' cache is only listed when Heft has Full Disk Access.
Developer toolsPackage and build caches for npm, Yarn, Bun, pip, Cargo, Go, Gradle, NuGet, Deno, Composer and Electron. On macOS also Homebrew, Xcode (DerivedData, simulator caches, simulators for runtimes you no longer have, device support files), CocoaPods, and Docker's build cache and dangling images.
PrivacyRecent items, the clipboard and the DNS cache. On Windows also Run dialog and Explorer address bar history, and on macOS Finder's recent folders and Go to Folder history. None are ticked by default.

Heft has no rules for saved passwords, and none for the Windows Prefetch folder: clearing Prefetch makes programs start more slowly, not faster.

How it stays safe

System caches on Linux

On Linux, some caches belong to the system, and the right way to clear them is the tool that owns them. Heft runs those tools instead of deleting files itself:

Heft shows the estimated saving first. Commands that need root go through pkexec, which asks for your password with your desktop's own prompt, once per clean. On macOS, the Xcode simulator cleanup runs xcrun simctl delete unavailable in the same spirit.

Weekly cleaning (Windows and macOS)

At the bottom of the Cleaner page, tick Clean the selected items every Sunday. Heft then runs heft --clean with your current selection at noon every Sunday.

Untick the box to remove it. On Linux, you can schedule heft --clean yourself; see Command line.

WSL and Docker disks (Windows)

WSL 2 distros and Docker Desktop keep Linux's files in a virtual disk (.vhdx) that grows as Linux writes data but never shrinks when the data is deleted. The WSL and Docker disks section finds them and shows their size.

  1. Tick the disks to compact and press Compact.
  2. Heft can first run fstrim inside each WSL distro, so the disk knows which space Linux has freed.
  3. It shuts WSL down with wsl --shutdown, then compacts every disk with diskpart in one go. Windows asks for administrator permission once.

Large disks can take minutes. When it's done Heft shows each disk's size before and after. Disks already set to sparse shrink by themselves and can't be ticked.

Windows' own tools

Some cleanup belongs to Windows. The Cleaner page has shortcuts to:

macOS's own tools

On a Mac, the Cleaner page has shortcuts to:

Without Full Disk Access, Heft can't see inside the Trash, Safari's cache or Recent items, and it doesn't list Safari's cookies, history and last session or new Teams' cache, which macOS keeps in protected places. The page says so and has a button to open System Settings › Privacy & Security, where you can allow it. Quit and reopen Heft afterwards.

Safari's history comes back if Safari syncs through iCloud: your other devices send it back. To clear it everywhere, use History › Clear History in Safari.