Difference between revisions of "Tidy-rpm-cache"
(Created page with "=tidy-rpm-cache.py (previous rm_obsolete_rpms.py)= We can download latest version of tidy-rpm from internet and then use it to delete obsolete packages from yum-cahce. This s...") |
m |
||
Line 7: | Line 7: | ||
tidy-rpm-cache.py --dir=/var/cache/yum | tidy-rpm-cache.py --dir=/var/cache/yum | ||
</pre> | </pre> | ||
==Information on rm_obsolete_rpms== | |||
Normally yum packages are stored in sub-directories inside '<tt>/var/cache/yum</tt>' and they occupy lot of space. Multiple versions of updates / install files for same package can be present in yum cache which leads to wastage of hard-disk space. We may want to keep only the latest versions in cache so that we can copy cache to other machine and avoid re-download of package over internet. But for this we do not need older versions of packages. | |||
Hence to selectively remove older versions of packages we can use '<tt>rm_obsolete_rpms</tt>' python script. | |||
If we use this script on 64-bit systems than it cannot understand that both 32-bit and 64-bit versions of package must be kept. Hence we can run the script as: | |||
<pre> | |||
./rm_pbsolete_rpms -n 1 -d /var/cache/yum | |||
</pre> | |||
so that on 64-bit systems last two version of packages are kept. In this case both 64-bit and 32-bit versions of package are left and only older versions are deleted from cache. |
Revision as of 04:35, 13 November 2012
tidy-rpm-cache.py (previous rm_obsolete_rpms.py)
We can download latest version of tidy-rpm from internet and then use it to delete obsolete packages from yum-cahce. This script saves considerable disk-space and keeps only latest version of files in cache / repository.
To see list of obsolete RPMs inside a directory recursively and then get option of deleting obsolete RPMs use:
tidy-rpm-cache.py --dir=/var/cache/yum
Information on rm_obsolete_rpms
Normally yum packages are stored in sub-directories inside '/var/cache/yum' and they occupy lot of space. Multiple versions of updates / install files for same package can be present in yum cache which leads to wastage of hard-disk space. We may want to keep only the latest versions in cache so that we can copy cache to other machine and avoid re-download of package over internet. But for this we do not need older versions of packages.
Hence to selectively remove older versions of packages we can use 'rm_obsolete_rpms' python script.
If we use this script on 64-bit systems than it cannot understand that both 32-bit and 64-bit versions of package must be kept. Hence we can run the script as:
./rm_pbsolete_rpms -n 1 -d /var/cache/yum
so that on 64-bit systems last two version of packages are kept. In this case both 64-bit and 32-bit versions of package are left and only older versions are deleted from cache.