dhempy
Posts: 2
Joined: Sun Mar 26, 2023 6:31 pm

Selective Updating

Sun Mar 26, 2023 6:40 pm

Good Day:

I have an RPi4b that I've configured to do some webscraping with Python/Selenium/Brave. In order to get things working, I had to install a couple of older software distributions. The Pi is now telling me that software updates are available and I'm concerned that my older installations will get upgraded if I follow the standard "update/upgrade" everything protocol.

So I have 2 questions: 1) Is there a way to list which upgrades the system has identified? and 2) This would just be a confirmation ... I would then just apt -upgrade <software> to do individual upgrades correct?

Thanks.

P.S. Maybe there is a way to Exclude individual libraries from the complete update/upgrade methods?

terribleted
Posts: 1074
Joined: Tue Oct 06, 2020 8:07 pm

Re: Selective Updating

Sun Mar 26, 2023 6:52 pm

there is a way to mark a package to be held. (not upgraded).
sudo apt-mark hold <package-name>

See apt-mark --help
i had a Trash-80 model 1 (circa 1980). upgrading from 4k to 16k of RAM, i thought "i'll never use this much RAM".
Now i have a computer with a million times that much memory. And i keep running out of it.
Not the computer....ME.

RonR
Posts: 3190
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Selective Updating

Sun Mar 26, 2023 9:46 pm

dhempy wrote:
Sun Mar 26, 2023 6:40 pm
1) Is there a way to list which upgrades the system has identified?

After running 'apt update', when upgrades are available you should see:

NN packages can be upgraded. Run 'apt list --upgradable' to see them.

dhempy
Posts: 2
Joined: Sun Mar 26, 2023 6:31 pm

Re: Selective Updating

Mon Mar 27, 2023 1:49 am

Thanks you both for answering! I will try them out and RTFM! Dan

User avatar
rpdom
Posts: 21811
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Selective Updating

Mon Mar 27, 2023 8:40 am

To get a list of packages that can be upgraded

Code: Select all

apt list --upgradable
To upgrade a single package (will also pull in any dependencies)

Code: Select all

sudo apt install <package names(s)>
I don't know a way to limit "upgrade" to a list of packages other than holding some packages, but install will install the latest version even if an older version of the package is already installed.

There probably is a way. I just haven't looked hard enough.
Unreadable squiggle

Return to “Beginners”