Hello,
I am using Fedora, but have a temperamental internet connection at home. Updating can be difficult because large downloads are slow and tend to reach timeouts most of the time.
Is there a way to have my system download one update from the list at a time instead of multiple?
This might at least help prevent me needing to retry upwards of 4-5 times hoping it all eventually succeeds within the timeout and failure limits it seems to have.
I did check online a bit and the manual for dnf, but web searching seems to bring up “updating a single package” not iterating through the available updates to baby my horrible internet. And the manual didn’t seem to mention anything regarding this.
Hoping there is something.
Thank you very much for any suggestions or guidance.
upgrade and update are the same thing, to put it simply, because they are needed to download new versions of programs or so that you can install fresh updates and the latest versions of applications. update — updating the list of packages. upgrade — updating the packages themselves.
Thank you for your help.
I was looking for a way to decrease the amount of consecutive packages being downloaded during an update/upgrade.
With the help of some other comments I was able to find the following:
It’s referencing increasing the max parallel downloads to increase upgrade/update speed. But maybe it’ll work for what I’m looking for by lowering the value instead.
Thank you very much for taking the time to help me.
max_parallel_downloads: This parameter specifies the maximum number of packages that DNF can load in parallel. The default value is usually 3 or 5, depending on your system. Decreasing the value: By decreasing the value of max_parallel_downloads, you will force DNF to load packages sequentially or in smaller groups. For example, by setting max_parallel_downloads=1, you will effectively disable parallel downloading and DNF will only download one package at a time. Speed Impact: Reducing max_parallel_downloads will cause the update process to slow down. In conclusion, reducing max_parallel_downloads is a perfectly logical way to reduce the number of DNF packages being loaded in parallel. Just be aware of the impact on speed and test different values to find the best one for your conditions.
Reporter: [REDACTED]
Reason: Possible AI bot. Responses are slightly off-track, and generic.
Can’t speak to Fedora specifically, but most package managers let you configure the number of concurrent download threads it will use. Most are 3-4 it seems. Finding yours and setting it to 1 will probably do exactly what you’re asking.
Another option is to set it to only download the files, then install manually once they’re local to you. The options for this differ (eg. when installation order matters), so an RTFM is worth the time spent.
It looks like the setting is
max_parallel_downloads
in/etc/dnf/dnf.conf
. Here’s a post on how to increase it - so do the opposite, and set it to 1.Lol dang. I didn’t get a message about your comment.
But, I was able to find a different article discussing the same thing.
Thank you very much for you help with this though. This seems to be exactly what I needed.
I really appreciate it.
Also there’s a
timeout
setting in the same file.Thanks! I’ve been able to find out about this.
I didn’t see your comments before I found it though. But I really appreciate you taking the time to help me out.
Thank you very much.
It doesn’t really make sense to do that. Even if you do resolve dependencies to identify which one needs to come first, you’re still going to need to take manual action to download and install subsequent packages.
You should probably see if you can increase the timeout and number of retries, or just set it to run with --download-only (or whatever the dnf equivalent is) in a loop until it succeeds. Then you can run the actual install all in one go from the download cache.
It looks we’ve been able to find the following for the config file for dnf:
max_parallel_downloads
in/etc/dnf/dnf.conf
.Here’s a post on how to increase it - so do the opposite, and set it to 1.
Thank you for taking the time to help me out. I appreciate it.
Let us know if it works. Based on your description of the problem, it sounds like you’ll find it still times out due to a bad connection, except you’ll have gotten fewer downloads done.
I’ll let you know!
My signal reliability and bandwidth will stay the same, but, distributing that between 1 download compared to 4-5 might make an improvement on it’s own, allowing the download to more often finish before it times out. But, we’ll see. Gotta get back to my PC.
If not, maybe the timeout setting in the config file will help a little.
Will report back!
came here to see if Fedora had a --download-only equivalent.
Hello.
I just wanted to leave this here, in case you wanted to look into it for something you had.
It looks we’ve been able to find the following for the config file for dnf:
max_parallel_downloads
in/etc/dnf/dnf.conf
.Here’s a post on how to increase it - so do the opposite, and set it to 1.
Thank you for taking the time to help me out. I appreciate it.
have a temperamental internet connection at home
Love this description. :D
I don’t use Fedora or
dnf
, but looking at the manual on https://man7.org/linux/man-pages/man8/dnf.8.html I could find following:dnf [options] upgrade <package-spec>... Updates each specified package to the latest available version. Updates dependencies as necessary. When versions are specified in the <package-spec>, update to these versions. dnf [options] upgrade-minimal Updates each package to the latest available version that provides a bugfix, enhancement or a fix for a security issue (security).
So I assume you can just specify which package to upgrade only.The minimal variant does not support specific packages, but maybe a good idea to get all important stuff in one batch first. Then the general upgrade command would have less work to do I guess. At least here on the Arch side, upgrading a single package is absolutely not recommended. But I don’t know how
dnf
handles this.Also on Archlinux with
pacman
each package gets downloaded before the installation process begins. So if your internet goes away while downloading, it does not matter, because next time it will only download the rest of the packages and continue from that point. And it only starts installing locally after everything is downloaded from internet. Now, as said I don’t know howdnf
handles this, but would assume it does it similar.Going off your comment and someone else’s I was able to find the following:
It’s referencing increasing the max parallel downloads to increase upgrade/update speed. But maybe it’ll work for what I’m looking for by lowering the value instead.
Thank you very much for taking the time to help me.
Hi, always nice to get a reply back after solution is found. Unfortunately I cannot see what is after the “following:” and “It’s referencing…”. Could be my configuration, not sure whats going on here. It looks like this for me (scaled down, no need for full size anyway, so it does not confuse readers):
Oh no, my upload must not have gone through…
It was just a screenshot of a page I found.
I think it was this:
Seems like there are many pages effectively copying an article more or less exactly like this.
But, hopefully the options help me, and whoever might come across this.
Does this show up correctly?
I see. Well for the link, it shows up as a hyperlink to the webpage itself. But I see now what you meant with it.
The major issue is to complain to/about your provider, not mess around with the workaround solutions.
That said once you have the list of packages, you can download them on your phone and seamlessly transfer them to your pc with Syncthing.
Have a look at dnf-automatic to do downloads only. I’m not sure how many retries it allows.
There is also the option of limiting your bandwidth on the PC so that it doesn’t choke.
Ultimately the ISP has to provide a working service.
Hello! Thanks so much for helping me with this.
It looks we’ve been able to find the following for the config file for dnf:
max_parallel_downloads
in/etc/dnf/dnf.conf
.Here’s a post on how to increase it - so do the opposite, and set it to 1.
Also, I wanted to ask you about your suggestion for downloading on the phone.
What method or methods were you considering for downloading the packages on a phone? I haven’t heard of this before.
Thank you again for taking the time to write back.
I really appreciate it.