Since I always forget the commands, I decided to write them down and share them along the way! 😉
It’s never a good idea to install a OS or software and leave it without updating it ever again. Whether it’s WordPress or your Raspberry Pi, setting up a new environment requires your attention and should be updated on a regular bases.
As mentioned before I have WatchTower installed so I like to update my dockers once a week and my RPi4B once a month. Why? That answer is very simple: The first and probably the most important reason is security. The second reason, which is also related to the first reason, is that the OS may contains bugs that could also affect its functionality without being related to security. Therefore keeping the software up to date lowers the chances of hitting these bugs.
Before we start, note that all of the commands below use the “sudo” prefix. This gives the command superuser privileges to perform system-level changes.
- Make sure you have a backup. This is always your first step!
- Login on your RPi using Putty
- Update the list of available packages from the online repository:
sudo apt-get update
- Upgrade the installed packages to their latest available versions.
sudo apt-get full-upgrade
This command is meant to upgrade the installed packages to their latest available versions. You could also use the “sudo apt-get upgrade” command. However, the apt-get full-upgrade command also removes packages that are no longer needed and installs new dependencies that have been introduced by updated packages. It performs a more comprehensive upgrade of the system than the “sudo apt-get upgrade” command, and no cleanup commands are needed.
- Now, reboot your Raspberry Pi
sudo reboot
- You’re done!
Generally speaking, doing this regularly will keep your installation up to date for the particular major Raspberry Pi OS release you’re using. This means that it will not update from a major release to another!