This snip was originally created to document the arse-ache I had building my second Pi; it documented problems with Jesse & Stretch. The current release is Buster and so much of this content is deprecated. I amended this in Dec 2025 and in April 2020. I have moved deprecated content to the comments and updated this post. For more, see below/overleaf. …
I have spent a lot of time working on this. I created a script to do this in batch and used cron to run the job, updates only.
This wasn’t very satisfactory.
It’s not a goof idea to run ‘apt upgrade’ in non interactive mode as one may need to interact with it which doesn’t work in batch.
Raspbian now offers this as a systemd service, see Automate Raspberry Pi OS Updates from gemini.google.
I originally wrote as a first paragraph, I had big problems with APT, (the advanced packaging tool) updating Jessie to Jessie last, and then taking it onto Stretch on my Raspberry Pi. I must have needed to download and update over 2000 packages. Some of this is documented in Raspberry PI Part Deux but I have created this snip to make it easier for others to find in order to help those that follow me. I found that an apt transaction would either hang, or cause the machine to reboot. I have not found a compelling solution but I have now completed the exercise.
This article at the Raspberry PI site describes upgrading the distro.
Bloody hell. Is
nicethe answer to apt’s bad behaviour? It would seem not.I had some failures due to missing locales, this page helped. Can’t remember if I had to install
locale-genorupdate-locale.As I said, as I moved forward from a two year old Jessie OS image to Stretch, I find that often apt-get causes a hang or a reboot. There’s some stuff on google, but nothing fabulously compelling. Using nice still had problems. I used a combination of the following commands
Anecdotally it seemed to often fail when updating systemd files
I finally removed the original problem definition and remedy.
My original problems occurred while using Jesse & Stretch. I needed a lot of additional files.
I had big problems with APT, (the advanced packaging tool) updating Jessie to Jessie last, and then taking it onto Stretch on my Raspberry Pi. I must have needed to download and update over 2000 packages. Some of this is documented in Raspberry PI Part Deux but I have created this snip to make it easier for others to find in order to help those that follow me. I found that an apt transaction would either hang, or cause the machine to reboot. I have not found a compelling solution but I have now completed the exercise. Here are my old notes.
I used the apt tools either apt or apt-get. I used the CLI. I eventually uninstalled wolfram-engine because it was so big; its size jeopardised the downloads because I have a small SD card. (You might like to uninstall libreoffice as it’s so large and pretty unused on a Pi, at least by me.) Stretch is quite big.
I should document the hardware version, Raspberry Pi 3 Model B Rev 1.2
.
I discovered the systemd service package today and amended the page to reflect it.