Routine maintenance on RaspPi

Backstory:

I have a Raspberry Pi 5 system with desktop, therefor it automatically manages, suggests, downloads, and has me click to install all updates.  I then restart every so often. Done.

I also have a headless Raspberry Pi 3B+ system running 32-bit OS, for purposes of my new weather station.  I connect to this from the RP 5 system via SSH and run CLI (Command Line Interface).  Haven’t done updates yet, as of 20261031, and need to do that.  Originally installed this around mid-September.

Locators:

There are several references to learn what to do, and this is one of them

https://www.raspberrypi.com/documentation/computers/os.html#manage-software-and-firmware-updates

Available space left on my 32GB SD card:

df-h

Note: I’ve found that oftentimes, I’m doing multiple clarifying searches to get to the answer I want, but that’s OK, as the knowledge starts building.

What I’m looking for is the details within “root”, but I’m not seeing that listed.

I found that I have to ignore everything and just focus on the lines listed for /dev/xxxx.  That give me two to look at

/dev/mmcblk0p2  29G     2.6G  26G     10%  /

/dev/mmcblk0p2  505M  91M   414M  19%  /boot/firmware

Looks like /dev/mmcblk0p2 is mounted as boot and root is “/”

Therefore, I have 29G usable (of a 32GB SD card) and I’ve used up 2.6GB so far, or 10%.  Based on current usage/state, this makes sense.

Updating Packages using APT:

Raspberry Pi prefers the APT (Advanced Packaging Tool) be used to update software, OS (Kernel), etc.

First thing to do is to update the package list, so it knows what’s available in terms of versions.

sudo apt update

Note: sudo is used so that it returns asking for root password, and then no security issues during process.  I’ve also seen this command bundled (sudo apt update && sudo apt upgrade – y), but I like doing things one command at a time

Note: In my case, it fetched 16.8MB in 12 seconds.  31 packages can by upgraded

Run ‘apt list — upgradable’ to see them

Note: Not really sure what I’m looking at, but I seen things raspi-config; SSL; etc.  I had to Ctrl-C to get back to the CLI prompt.

Upgrading all package updates:

sudo apt full-upgrade

Note: You can also do sudo apt upgrade, but Raspberry Pi like full-upgrade as Raspberry Pi OS changes more frequently than Debian, so we want everything in synch – something like that.

Note: Comes back with confirmation that it’s going to upgrade 31 packages.  Download size is 53.8MB and Space needed 26.2 and 26.9GB available.  So far so good. Yes.

This is cool being able to specifically do CLI-level upgrade commands on my own.

Note: After doing that, there was a letter from Samuel at Debian explaining having to bump the package 3.5.0. rather than backporting all patches individually.   I pressed “q” and it continued on.  Unpacking and then running.

Cleaning up disk space:

sudo apt clean

Restarting the system:

sudo reboot

Note: Its returns “Send disconnect: Broken Pipe”

Quit terminal app; opened terminal app; ssh <server name> and entered password; connected back in again

 

 

 

 

This entry was posted in Raspberry Pi. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.