Hi, I need to know how to configure dnf to change the location where the packages to be installed are stored. My problem is that I have limited space on /var and would like to use a different partition for downloaded packages. In particular to make upgrades (currently from f30 to f31). Thanks in advance for any info.
Regards,
Juan
Have you tried adding the âcachedir=<path>
â line to â/etc/dnf/dnf.confâ?
Another option might be removing â/var/cache/dnfâ and replacing it with a symlink to where you want.
That feels more like a bit of a cheat, but whatever works.
Hello @fiolj and welocme to the community! If you havenât already done it, please read the stuff in the #start-here category.
In addition to the option suggested by @cptgraywolf, there is also a --downloaddir=
option to pass to DNF, have a look to https://dnf.readthedocs.io/en/latest/command_ref.html#options or to the DNF man page.
In addition, look at this previous topic: https://discussion.fedoraproject.org/t/specifying-location-to-be-used-during-fedora-version-upgrade/64259
Thanks, Iâve tried when upgrading to f30 and did not work. I did not
pursued it at the time. Iâll check again and report back in a few days.
Hello @alciregi, thanks for all the info. Iâve skipped the option
ââdownloaddirâ when readin the man page. It seems exactly what I need,
if I cannot set it in the configuration file with âcachedirâ. Regards
Hello, thanks for all the suggestions. For future reference I am reporting back briefly on what happened when trying to change the downloading location for fedora upgrade
-
The line with the option cachedir= in the configuration file did not work. It seems that in my system the location where packages are downloaded by default is /var/lib/dnf/system-upgrade and not /var/cache/dnf (that is the location that may be changed by the above line.
-
The command line option --downloaddir made the trick. Explicitly (using my preferred path
/storage
):mkdir /storage/system-upgrade
dnf system-upgrade download --downloaddir=/storage/system-upgrade/ --releasever=31
Regards,
Juan
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.