[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
  Web www.spinics.net

Re: How to delete old yumdb entries?

On 15 September 2011 16:54, Mike Fleetwood
<mike.fleetwood@xxxxxxxxxxxxxx> wrote:
> I'm now going to use some of Ljubomir's details and identify entries
> for no longer installed RPMs and delete them.

OK, I have now deleted all the yumdb entries for old packages no
longer installed and reduced its size from 127M to 26M.  Curiously
yumdb reported no attributes for these no longer installed packages,
from the few samples I checked.

Thanks everyone,


[root@rockover ~]# du -sh /var/lib/yum/yumdb
127M    /var/lib/yum/yumdb
[root@rockover ~]# ls -d  /var/lib/yum/yumdb/?/* | sed
's/\([^-]*-\(.*\)-[a-z0-9]*\)/\2 \1/' | \
> while read pkg file
> do
> rpm -q "$pkg" 1> /dev/null && echo "INSTALLED $pkg $file" || echo "NOT $pkg $file"
> done > packages.txt
[root@rockover ~]# wc -l packages.txt
5551 packages.txt
[root@rockover ~]# grep ^INSTALLED packages.txt | wc -l
[root@rockover ~]# grep ^NOT packages.txt | wc -l
[root@rockover ~]# cut -d' ' -f1-2 packages.txt | head
NOT audit-libs-devel-2.0.4-3.fc13
NOT avahi-autoipd-0.6.25-7.fc13
NOT audacious-1.5.1-9.fc10
NOT abrt-plugin-runapp-1.1.14-1.fc13
INSTALLED abrt-gui-1.1.18-1.fc14
NOT alpine-2.00-8.fc12
INSTALLED aalib-devel-1.4.0-0.18.rc5.fc12
INSTALLED awesfx-0.5.1c-3.fc12
INSTALLED abrt-plugin-bugzilla-1.1.18-1.fc14
NOT apr-util-ldap-1.3.10-1.fc12
[root@rockover ~]# yumdb info audit-libs-devel-2.0.4-3.fc13
Loaded plugins: presto, refresh-packagekit
[root@rockover ~]# yumdb info avahi-autoipd-0.6.25-7.fc13
Loaded plugins: presto, refresh-packagekit
[root@rockover ~]# yumdb info audacious-1.5.1-9.fc10
Loaded plugins: presto, refresh-packagekit
[root@rockover ~]# yumdb info abrt-plugin-runapp-1.1.14-1.fc13
Loaded plugins: presto, refresh-packagekit
[root@rockover ~]# yumdb info abrt-gui-1.1.18-1.fc14
Loaded plugins: presto, refresh-packagekit
     changed_by = 500
     checksum_data =
     checksum_type = sha256
     command_line = update abrt-*
     from_repo = updates
     from_repo_revision = 1304109743
     from_repo_timestamp = 1304114834
     reason = user
     releasever = 14
[root@rockover ~]# yumdb info aalib-devel-1.4.0-0.18.rc5.fc12
Loaded plugins: presto, refresh-packagekit
     checksum_data =
     checksum_type = sha256
     from_repo = anaconda-InstallationRepo-200911081854.i386
     from_repo_revision = 1278350419
     from_repo_timestamp = 1278350670
     reason = user
     releasever = 12
[root@rockover ~]# grep ^NOT packages.txt | cut -d' ' -f3- | xargs rm -rf
[root@rockover ~]# du -sh /var/lib/yum/yumdb
26M     /var/lib/yum/yumdb
Yum mailing list

[Home]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Red Hat 9 Bible]     [Fedora Bible]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux

  Web www.spinics.net