Hi,
The FHS describes the purpose of /var/cache as follows [1]:
<cite> /var/cache : Application cache data Purpose
/var/cache is intended for cached data from applications. Such data is locally generated as a result of time-consuming I/O or calculation. The application must be able to regenerate or restore the data. Unlike /var/spool, the cached files can be deleted without data loss. The data must remain valid between invocations of the application and rebooting the system.
Files located under /var/cache may be expired in an application specific manner, by the system administrator, or both. The application must always be able to recover from manual deletion of these files (generally because of a disk space shortage). No other requirements are made on the data format of the cache directories. </cite>
From this, I conclude that it should be "safe by definition" to remove /var/cache/<dir> directories and/or files below such directories upon final package removal.
ATM, none of the packages in Fedora using /var/cache/<dir> (e.g. yum, mock, abrt) does so. This leads to /var/cache/ gradually filling up with orphaned/unused files, e.g. when temporarily installing mock or abrt.
Thoughts?
Ralf
[1] http://www.pathname.com/fhs/pub/fhs-2.3.html#VARCACHEAPPLICATIONCACHEDATA
On Tuesday 09 February 2010, Ralf Corsepius wrote:
From this, I conclude that it should be "safe by definition" to remove /var/cache/<dir> directories and/or files below such directories upon final package removal.
ATM, none of the packages in Fedora using /var/cache/<dir> (e.g. yum, mock, abrt) does so.
vdr-osdteletext does, but that's a drop in the ocean.
This leads to /var/cache/ gradually filling up with orphaned/unused files, e.g. when temporarily installing mock or abrt.
Thoughts?
FWIW, no objections to mandating removal of that stuff here.
packaging@lists.fedoraproject.org