Safety guide

QDirStat cleanup actions and safe deletion practices

Configure QDirStat cleanup actions carefully, verify selected paths, use normal-user permissions and reduce the risk of deleting important files.

QDirStat cleanup actions and safe deletion practices original dashboard illustration

QDirStat can support cleanup actions, but the application cannot determine whether a large file is personally valuable or required by another program. Cleanup commands should therefore be treated as administrative tools, not automatic recommendations.

A good cleanup workflow uses the scan to identify a candidate, then verifies the path, owner, recent use and backup status before any deletion or modification command runs.

Separate analysis from deletion

Scan without pressure

Do not start cleanup while a disk emergency is forcing rushed decisions. Identify several candidates and estimate the space each action will recover.

Record the original path

A copied path helps you verify that a command will affect the intended item and not a similarly named directory.

Design safer cleanup actions

Prefer reversible actions

Moving an item to a quarantine or trash location can be safer than immediate permanent deletion, provided enough free space remains.

Quote paths correctly

Cleanup commands must handle spaces and special characters safely. Test a command on disposable data before connecting it to important directories.

Avoid broad wildcards

A wildcard can expand to more files than expected, especially when the working directory changes.

Use the least privilege required

Run as a regular user

This limits cleanup actions to files your account normally controls.

Elevate one task, not the whole session

If a protected directory requires maintenance, use a documented system-specific method rather than launching every scan and action with full privileges.

Create a verification checklist

Owner and purpose

Know which application created the file.

Backup and recovery

Confirm how the file would be restored.

Active use

Check whether a service or process is using it.

Expected result

Estimate the recovered space and verify it after cleanup.

Important: Never create a cleanup command that recursively deletes an unchecked path. Test commands with harmless sample data and visible output first.

Next steps

Return to the main QDirStat page for the source archive, compatibility summary and twenty-question FAQ, or continue with a related guide below.

Download Now