0

I live in the boondocks, where internet connection can be...well...let's just say "not so good." While trying to keep my system (Buster) up to date, using 'apt update,' the reported download rates regularly vary between tens of kB/s to hundreds of B/s, to dead stop. Not surprisingly, apt eventually gives up and terminates with "...some index files failed to download." Also, usually, with "Undetermined Error" or "Connection timed out" followed by an IP address.

Is there a way to get apt to try again, without re-issuing the command in the terminal?

2
  • Post ACTUAL error messages! A local mirror may help (depending on actual problem) see raspberrypi.stackexchange.com/a/105824/8697
    – Milliways
    May 14 at 8:25
  • I second that a local mirror would help, especially if you have more than one device with the same OS that needs to be kept up to date!!
    – user10489
    May 15 at 12:05

1 Answer 1

0

This question looks like it's a better fit for Superuser, but you should be able to do

until command
do
sleep 1
done

which will repeat command until it succeeds.

New contributor
Alex is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.