Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.
Launchpad Entry: handling-full-disks
Packages affected: system-cleanup
Summary
This spec describes a tool that helps the user to free disk space by offering to remove temporary files.
Release Note
A new tool that helps freeing up diskspace is now part of the default install.
Rationale
If a machine runs low on disk space the user is on his own. There is no good GUI tool to help him freeing space. The "system-cleanup" tool addresses this issue.
Use Cases
- Alice runs out of disk space because her apt cache is too big
- Bob has a very small /boot partition and with the addition of new kernels it eventually runs out of space.
Design
The tools needs to be written in a way that makes it easy to add new GUI frontends (like qt/text) and to make it very easy to add custom free space plugins to make community participation easy.
When gnome-volume-manager (or kded) detect that the disk space runs low, it pops up a notification. This notification should include a button to launch the system-cleanup helper with the appropriate filesystem that is low on disk space. The user-cleanup helper should also be run when the disk quota is full.
Some of the areas where space can be freed require administrative privileges. We will only show them if the user is in the admin group (or the distro specific equivalent).
Possible targets:
- User:
- tracker/strigi cache: maybe a problem because it can not be re-generated (make sure to never remove "metadata")
- thumbnail cache
- firefox/epiphany/konqueror cache
- Trash
~/.thunderbird/*/ImapMail (dangerous)
- ~/.evolution/mail (dangerous)
psp font cache from OpenOffice
- google earth cache
- xchat/pidin logs may be worth to be compressed (upstream!)
- ccache
- button to spawn baobab
- debclean on all debian branches
- ~/mail/.imap dovecot mail indexes
- System:
- old rotated Logs
- apt cache
- apt-get autoremove / deborphan
- old kernels
- Unused / less used software : is there any way to list them? (use the popcon heuristics for this?)
Depending on the partition layout the tool needs to make intelligent decisions. E.g.:
- /var - cleanup apt cache
- /boot - cleanup old kernels
- /tmp - old cruft, but we need to be *very* careful (check out temp-reaper/tmp-watch)
Additionally it should offer to run something like "fdupes" to find duplicated files in the users home directory. If the tool runs out of ideas, it should offer to run baobab and let the user continue the cleanup manually.
It is important that we ensure that it is possible to login into gnome even if $HOME is full. We should add a automatic test for this.
Implementation
Each cleanup target is implemented as a plugin. The directory with the mount point that runs low on disk space is passed to the plugin and it then declares how much space it can free where (symlinks needs to be considered too). Support for a global plugin directory where applications can store plugins (e.g. opera to delete its own cache) as well as user plugins should be added.
Test/Demo Plan
TBD
This need not be added or completed until the specification is nearing beta.
Releated Work
Outstanding Issues
- What to do for kde? they don't have a daemon that checks the disk space.
BoF agenda and discussion
gnome-volume-manager has some heuristics to take the velocity of disk-fill up into account (do some learning here to try to figure out the users disk-usage pattern?)
Random:
- Like the out of memory killer of the kernel, the tool could stop/kill application that will conduct to disk full