Housekeeping: Monthly Server Cleanup
Clear out what piles up, with a report of every run
Clear out what piles up on a server
A web server slowly fills with things nobody needs any more: old system logs, downloaded packages, expired PHP sessions, crash dumps. Housekeeping finds them once a month, removes them, and tells you exactly what it found and how much space it freed.
01 · How a run works
- It runs by itself on the first day of every month.
- Every rule first detects, reports what it found, then removes it and reports what it reclaimed.
- Only one run at a time, and never while a backup is running. A run that cannot start is still listed, with the reason.
- Nothing inside a folder your sites serve is ever deleted, and backups are never touched.
02 · The buttons
Runs every enabled rule without touching anything, and reports what it would reclaim.
A real run, right away. You confirm first: enabled rules delete what they detect.
Reloads the status and the list of runs.
03 · The rules
Open Rules to see each rule, what it never touches (the Refuses column) and its setting. Tick or untick rules, change a setting, then click Save.
| Rule | What it clears | Setting (default) |
|---|---|---|
| Systemd journal | System log entries older than the window. | Keep days (30) |
| APT package cache | Downloaded package files kept after installs. | none |
| Orphaned vhost logs | Old rotated logs of sites whose virtual host is gone. | Minimum age (30 days) |
| PHP session files | Session files past their own lifetime. | none |
| Build caches | Composer, npm and yarn caches in home folders. | Minimum age (14 days) |
| Core dumps | Crash dumps. | Minimum age (7 days) |
| Package config leftovers | Old copies of config files left behind by package updates. | Minimum age (30 days) |
| Drush backups | Drush backup folders in home folders. | Minimum age (30 days) |
| MySQL slow-query and error logs | Empties the two log files in place; never removes a file. Off by default. | Only above (256 MB) |
Untick Housekeeping enabled on this server to stop the monthly run. Preview and Run now still work.
04 · Reading a run
- Last Runs lists the runs, newest first: date, type (scheduled, manual or preview), duration, status and the space reclaimed (or Would reclaim for a preview).
- Open a run for the table per rule: what it detected, what it acted on, and anything skipped or refused. Show all opens the full list of paths, with Copy all.
- If a database dump or an archive sits inside a folder your sites serve, the run lists it in red: anyone can download it. Housekeeping leaves it where it is, so move or delete it yourself.
- An observation on
/bootshows how full it is and how many kernels are installed. It is reported only; housekeeping never removes kernels. - Tick runs, or Select all, and click Delete selected to remove them from the list.