I can find the version OS that's installed on my Pi 4. But how can I find out the official current version? Preferably in a way that can be scripted.
What I would love to do would be to write a script that would determine the version OS installed on my Pi (easy), then get the current official version (unknown), compare the two, and send myself an email if they differ. I would then schedule this in cron to run once a month.
Then, I wouldn't have to remember to check it manually. (When done manually I alternate between checking every couple of days, and checking once a year or so.)
Then, when I get an email that I'm out of date, I set aside some time to do the upgrade, and more importantly validating that the upgrade didn't break anything.
EDIT: I'm talking about major release levels, ie Stretch -> Buster-> Bullseye -> Trixie