Skip to content

Safety Model

fzihak edited this page Nov 27, 2026 · 1 revision

Safety model

Most cleaners ask you to trust them. FreeMyDisk is built so that a bug, a crash or a misclick can't cost you your files. These rules are enforced in the Rust engine, not only in the interface, and they apply to the app and the CLI alike.

The eight guarantees

# Guarantee How it works
1 Recycle Bin first With Always Route to Recycle Bin on (the default), every removal goes to the Recycle Bin. If a file can't be moved there, it is kept and flagged. There is never a silent fallback to permanent deletion.
2 Journal before delete Each removal is written to an SQLite journal in WAL mode before the disk is touched. If a cleanup is interrupted, the next start detects it and offers Review and restore.
3 Protected paths Windows, Program Files, user registry hives and FreeMyDisk's own files are behind a protected-path registry that no rule can bypass.
4 Nothing in use Files held open by a running process are skipped. Rules declare the apps that lock them, so the scan says "close Chrome to clean" instead of forcing it.
5 Recent files kept Temp and crash-dump cleaning skips anything changed in the last 24 hours. Emergency Rescue does the same.
6 Honest sizes Hard links are counted once, and locked or admin-only items are listed separately, so "space freed" is what you really get back.
7 Least privilege FreeMyDisk runs as a normal user. Tasks that need administrator rights go through a small helper (freemydisk-elevated.exe) that only accepts a fixed list of operations, behind the Windows UAC prompt.
8 Ask before acting Destructive actions need your click and a confirmation (Confirm Before Deletion is on by default). Anything permanent says so.

What FreeMyDisk never offers for removal

  • Windows system folders and Program Files
  • System files such as pagefile.sys, hiberfil.sys and swapfile.sys
  • App data that isn't a cache, such as WSL and virtual machine disks in AppData
  • Documents, saves, settings, sessions or downloads, through cleanup rules
  • The last copy of a duplicate group

How a cleanup runs

  1. Plan. The engine builds a list of exact paths and sizes from the selected rules. Protected paths are removed from the list.
  2. Check. Locked files, files in use and recently changed files are skipped and reported.
  3. Journal. Each item is recorded in the journal.
  4. Move. The item goes to the Recycle Bin.
  5. Commit. The journal entry is closed and the result is written to the Audit Log.

If the process stops between steps 3 and 5, the journal shows exactly what happened, and FreeMyDisk recovers on the next start.

Rule risk levels

Risk Meaning
Safe The app rebuilds the data by itself. The only effect is a slower first start.
Low Rebuilt automatically, with a small visible effect at most.
Moderate / Medium You may notice it, for example lost thumbnails, logs or cached state. Review before cleaning.

Clean Now on the Dashboard only takes rules marked Safe. Smart Select (Safe) in Deep Cleanup ticks only the rules marked as recommended defaults.

Turning the Recycle Bin off

If you turn off Settings → Always Route to Recycle Bin, cleanups delete files permanently to free space at once. The Deep Cleanup page then marks the disposal mode as Immediate Purge. Keep this setting on unless you know you need it off.

Reporting a safety problem

If FreeMyDisk ever removed something it shouldn't have, please report it. Use a bug report, or report it privately as described in SECURITY.md if it could be abused.

Clone this wiki locally