How to resume pacman package downloads?
Solution 1
This isn't pacman
's default behaviour: if the package has been successfully downloaded (ie., is not considered corrupt either due to incomplete downloading or a failed hash sum), then pacman shouldn't download the same package again. If the package has been partially downloaded, pacman
will resume downloading where it left off without you doing anything special.
You could also look at using a wrapper like Powerpill to assist with downloading over a flaky connection.
Solution 2
Just new to Arch, so maybe I am missing something.
For me pacman did not resume file downloads by default and together with my flaky Internet connection it was impossible to install packages bigger than about 1MB. It just started over again and again and never finished.
After some investigation in the pacman.conf docs, I used...
DisableDownloadTimeout
XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
...as well as...
UseDelta = 0.7
# a little extra
...to mitigate Germany's mobile Internet shortcomings. Now it resumes just fine.
Related videos on Youtube

l0b0
Author, The newline Guide to Bash Scripting (https://www.newline.co/courses/newline-guide-to-bash-scripting). Hobby (https://gitlab.com/victor-engmark) & work software developer.
Updated on September 18, 2022Comments
-
l0b0 8 months
I'm trying to install some updates while on a sketchy connection in Arch Linux. What is the best way to do that?
while ! pacman --noconfirm --needed --refresh --upgrade do : done
took over 90 minutes to complete. Possibly this is because I used the strangely named
--upgrade
option which is for reinstalling packages rather than doing a package upgrade (--sysupgrade
).-
hanetzer about 8 yearsExactly what I was thinking
-
-
l0b0 about 4 yearsInteresting settings.
UseDelta = 0.7
is the default according toman pacman.conf
. -
Admin almost 4 yearsAh, right. Initially I wanted to change that value but then struggled to understand the description and left it as it was predefined in pacman.conf. :)