Re: /var/cache/PackageKit/metadata gets very big

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

 



| From: stan <stanl-fedorauser@xxxxxxxxxxx>

Thanks for your useful response.  But there are still things that
puzzle/annoy me.

| On Thu, 17 Mar 2016 10:22:36 -0400 (EDT)
| "D. Hugh Redelmeier" <hugh@xxxxxxxxxx> wrote:
| 
| > On my Fedora 23
| > systems, /var/cache/PackageKit/metadata/updates/packages is full
| > of .rpm files.  For example, 2.7G on my desktop.
| > /var/cache/PackageKit/metadata/fedora/packages has some too.

| > "sudo dnf clean packages" doesn't seem to change this.  What does it 
| > change?
| 
| The dnf package storage is cleared.  PackageKit is independent of
| dnf.

Isn't dnf the user interface to PackageKit?

"man PackageKit" points to pkmon and pkcon, both with the identical
description: "PackageKit console client".  One of those is wrong.  In
any case, those commands don't seem to have knobs to adjust PackageKit
hoarding instincts.

| > What is the purpose of this directory of RPMs?
| 
| Saved in case of problems.

What kind of problems?

Perhaps they are used to reduce the size of download (so only a
difference needs to be transferred).

In any case, lots of the saved RPMs are obsoleted by other saved RPMs.
That seems like a waste.  So I deleted all the obsolete ones and saved
a lot of space.  I only bothered with
	/var/cache/PackageKit/metadata/updates/packages
so far.  That saved me almost 2G!

Here's how I did it.  Not quite a script yet.

	cd /var/cache/PackageKit/metadata/updates/packages

	# create a list of installed RPM files
	rpm -qa | sed -e 's/$/.rpm/' | sort >~/0installed

	# create a list of hoarded files
	ls >~/0saved

	# create a list of files that are obsoleted
	diff ~/0saved ~/0installed | sed -n -e 's/^< //p' >~/0obsolete

	# Exercise for the reader: delete files list in ~/0obsolete
	# This is the first step that requires root.
	# Note: ~/ means something different for each user.

Before I did this, "dnf update" failed due to lack of space.  After,
it just worked.  So I guess PackageKit isn't upset by files just
disappearing from this directory.

| > Is there a way of transplanting the RPMs to another system so that
| > downloading could be avoided?
| 
| rsync them into /var/cache/dnf/[hashed directory entry]/packages/

Thanks.  That seems a little hacky so I won't bother.

| > What is the proper way of deleting these RPMs to free up the space?  I
| > ask because on some machines (but not all) the space is burdensome.
| 
| There is a setting in the file
| /etc/PackageKit/PackageKit.conf
| 
| # Keep the packages after they have been downloaded
| #KeepCache=false

Thanks.  It didn't seem to affect old files (it didn't buy back space
that I needed for "dnf update"). I didn't try to debug this.  Perhaps
because PackageKit is a daemon and I didn't tap it on the shoulder to
reload the config.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux