Disk usage and safe cleanup (including rootless Docker)

Two screens: Disk only measures, Cleanup only deletes. Cleanup lists fixed, known categories of files that can be re-created, shows the size and the exact command for each, and runs nothing until you confirm.

Disk usage

Cleanup categories

CategoryWhat is removed
Package cacheapt's downloaded package files
System journaljournal entries older than 7 days
Rotated logsold, already rotated log files
Temporary filesold files in temporary folders
Crash dumpssaved crash reports
Docker build cacheper Docker daemon, through Docker's own prune
Docker unused imagesper Docker daemon, images no container uses, through Docker's own prune

Docker and rootless Docker

Each Docker daemon is handled separately: the system daemon and every user's rootless daemon are listed with their storage folder, running containers and any error. A rootless daemon's category ids end in @u<uid>. Cleanup goes to the daemon it names, through Docker itself. Running containers, the images of stopped containers and all volumes are never touched. If a daemon's sizes cannot be read, cleanup is not recommended for it.

What is never removed

Application data, databases, containers and Docker volumes. Only known files that can be re-created are listed.

Rights

Cleanup needs root or passwordless sudo on the server. Without them sizes may be incomplete and cleanup is not offered.

For AI

server_disk_usage and server_cleanup_scan are read-only. server_cleanup_run runs the cleanup commands of the categories you approve, as root, and needs a human approval for that exact call unless the device or SSH server is on full trust.