ServerAvatarDocs
Server management

Disk cleaner

See exactly what can be freed, clean it on demand, and schedule it so a full disk never surprises you.

A server fills up quietly: downloaded .deb packages nobody needs again, log files that have grown for months, rotated archives, old kernels. Disk Cleaner measures each of those, tells you how much is in it, and removes only what you tick.

The Disk Cleaner screen: a Disk space card reading 9% full with 79 GB free and 337 MB that can be freed, an Automatic cleanup card switched off, and a list of seven categories with their sizes

What the two cards tell you

Disk space is the headline — percent full, free space, and the line that matters here: "7.3 GB of 86 GB used · 337 MB can be freed".

Automatic cleanup is off by default — "Off — clean up by hand whenever you need to."

What can be cleaned

Each row is a category with its measured size and a tag for its group — Packages, Logs, Temporary files.

CategoryWhat it removes
Package cacheDownloaded .deb package files that are no longer needed (/var/cache/apt/archives).
Service logsEmpties the current log files of running services — kept, not deleted.
Site logsEmpties every hosted site's current access and error logs — kept, not deleted.
Rotated logsOld compressed and rotated log archives under /var/log.
Unused packagesAutomatically-installed packages and old kernels no longer required.
System journalsystemd journal entries older than the retention window.
Temporary filesOld files in /tmp and /var/tmp.

A category with nothing in it is greyed out and tagged Already clean.

Show exact folders expands each row to the real paths it will touch, which is the honest way to answer "but what exactly are you deleting". Re-measure runs the scan again; the line above the list says how fresh the numbers are.

Check first means check first

Site logs carries a Check first tag. It empties the access and error logs of every hosted site — fine on a quiet server, but if you are mid-investigation into a traffic problem, that is the evidence you were reading. Download what you need from System logs first.

Clean up now

Tick the categories you want, or use Select all cleanable. The button at the bottom right updates to show the total — Clean up 335 MB.

Click Clean up and read the confirmation. It lists each item with its size and path, and the total.

The Clean up these items? confirmation listing Package cache at 335 MB with its path /var/cache/apt/archives and a total of 335 MB, with Cancel and Clean up buttons

The line under the title is the rule to remember: "This cannot be undone. Active log files are emptied, not deleted." If any ticked item is one of the check-first kind, the dialog names it.

Confirm. It can take a minute on a busy server. When it finishes the result is stated plainly, and the categories re-measure themselves.

The Disk Cleaner screen after the cleanup: a green banner reading Freed 335 MB. The disk is now 8% full, with Package cache now showing 0 B and Already clean, and a Recent cleanups section showing the run

Recent cleanups at the bottom keeps the history — what was freed, when, how many items, and whether it was run By hand or by the schedule.

Automatic cleanup

Configure on the Automatic cleanup card sets it to run on its own.

The Automatic cleanup dialog: a Clean up automatically switch, How often and Run when disk usage is above fields, and a list of five schedulable categories with their sizes

  • Clean up automatically — the master switch. The fields below stay disabled until it is on.
  • How often — every hour, day, week or month.
  • Run when disk usage is above — a percentage. Leave it empty to clean every time it runs. Setting it to 80 means nothing happens on a half-empty disk.
  • What to clean — the categories to include.

Only the safe categories can be scheduled

The dialog offers five of the seven: "Only items that are safe to remove unattended can be scheduled." Site logs is not one of them — emptying those is a decision you make while looking at the server, not something to automate.

Limits and caveats

  • Nothing is deleted until you confirm, on this screen or in the schedule. Measuring is read-only.
  • Emptied is not deleted. Active log files are truncated so the service writing to them keeps working; it is the rotated archives that are removed.
  • The sizes are a measurement, not a guarantee. The disk may free slightly more or less, especially where a process still holds a deleted file open.
  • It cleans the system, not your applications. Old releases, build caches and node_modules inside an application directory are yours to manage — see that application's files screen.

On this page