Unless you like to live on the edge though, it's a really good idea to make a backup image of the SD card in the Pi. This can save you a lot of time when the SD eventually gets corrupted due to improper shutdowns too. I use Win32DiskImager to create the backup image of the SD card and Balena Etcher to burn it to a SD card should the need arise. Note that when using Win32DiskImager, you should see that the SD card from the Pi has two partitions, one is boot and one is root (larger).
To image the SD card (with both partitions), I selected the smaller boot partition in Win32DiskImager, and then after entering a filename to save the image as, I selected "Read". I don't know if it matters which is chosen, but I just picked the smaller "boot" partition here:
To update the Raspberry Pi OS I used the following (steps are detailed here):
Log into the Pi using the "pi" user. I use Putty to do this since it's free and it works.
Next I just entered the following:
sudo apt update
It will ask for the pi password again, and then it will start downloading updates (the Pi will need to have access to the internet for this).
After that is done, I ran this:
sudo apt full-upgrade
This took an additional 140MB or so and it asked me if I wanted to continue (I said "yes"). The update takes quite some time and will pause at a step where there are some notes regarding a change to the default behavior (had to do with a security patch), with the only option to press "x" to exit which is actually to continue, then I waited some more till it was done.
When the update was completed, I rebooted it.
sudo reboot
Once it was back up, I logged into Octoprint using the browser and updated that. I started with:
Octoprint 1.6.1
Python 2.7.16
OctoPi 0.17.0
To update, I clicked on the "wrench" icon at the top right, then selected "Software Update" from the left side frame, and then just clicked on "Update All". Octopi did it's thing and a few minutes later it asked me to reload it. I did that and since I was already on the current version it just updated some plugins.
After I tested the updated OS, I burned another image of the SD card to have as a more current backup, and then burned that image to a spare MicroSD card which I taped to the Pi so I can have a quick way to recover it if it should fail.