Re: How to delete old yumdb entries?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,
Mike

-- 

[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
1922
[root@rockover ~]# grep ^NOT packages.txt | wc -l
3629
[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
abrt-gui-1.1.18-1.fc14.i686
     changed_by = 500
     checksum_data =
56115fe58e65b008b61a3f4dcf63173724f4cee5813918f729bf442eb12cbf96
     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
aalib-devel-1.4.0-0.18.rc5.fc12.i686
     checksum_data =
12dcc4405509964c68ee30ab4ae0f6ea8877fc7fc7828b0b8f03c1655da298e3
     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
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux