How much cache does keepcache keeps?

Porfirio Andres Paiz Carrasco porfiriopaiz at gmail.com
Tue Nov 17 05:23:30 UTC 2015


2015-11-16 22:28 GMT-06:00 Sudhir Khanger <ml at sudhirkhanger.com>:
> Hi,
>
> I learned it the hard way that dnf undo/rollback will fail if packages to
> rollback to are missing. DNF devs don't think it is their problem that
> packages go missing. Even keepcache is set to false so that the chances of
> losing packages go high. I don't follow the logic that you write a feature
> but it's requirements are left to be fulfilled by fate of luck.
>
In the memorables yum days, yum was able to manage the installation
and upgrades from local packages and local repos build from
/var/cache/yum cached packages.

I read somewhere, that this feature is set false to prevent normal
users cache from growing up out of control (space).

>> keepcache
>> Keeps downloaded packages in the cache when set to True.
>
Yeaps, after adding this line to /etc/dnf/dnf.conf:
keepcache=true

> How much cache is kept? Is there a size limit? Is there a number of packages
> limit? Is there a number-of-versions-of-a-package limit?
>
There is not a unique answer to this question, since the amount of
data you can download through a Fedora cycle is determined by the
amount of times that a package receive an update.

If from the very start, after installing from a live media install if
you set it true, maybe at the end of a Fedora cycle you may end with
some gigas stored in your /var/cache/dnf, I still conserve my fedora
17 cache and is about 4 GB even when I reinstalled it because of
unconformity with Fedora 18.

So the unique limit you have is delimited by the space you have to
store data on your /var/cache/dnf, many people recommends having /var/
in a dedicated partition, even on a dedicated disk. The are not limit
on the size apart from the size of the disk/partition, there are not
limit on the number of packages nor it's numbers of versions.

>> Even if it is set to False and packages have not been installed they will
>> still persist until next successful transaction. The default is False.
>
They persist until the transaction and installation/upgrading process ends.

> Does that mean if I upgrade to pkg-1.0 to pkg-2.0 to pkg-3.0, pkg-1.0 is
> kept when it is upgraded to pkg-2.0 and when pkg-2.0 is upgraded to pkg-3.0
> it deletes pkg-1.0 and keeps pkg-2.0 in cache? Basically the last version is
> kept and all previous are deleted. How is this changed when a user sets
> keepcache to 1?
>
Nop, on the /var/cache/dnf/ is kept every all of package you download
as a result of installing it or dnf downloading it as an update.

> It probably seems it is best to setup dnf-local-plugin which keeps all the
> packages ever installed on my system.
>
You may keep all of the installed package un /var/cache, but not
having many diferent version installed at the same time.

> Regards,
> Sudhir Khanger,
> sudhirkhanger.com.
>
> --
> users mailing list
> users at lists.fedoraproject.org
> 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
>


More information about the users mailing list