[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Comments on upgrade steps from one version of Debian to another



On 8/20/2022 3:48 PM, John Boxall wrote:
> I created an upgrade script based on something I found a few years ago 
> that indicated the steps to follow to upgrade from one version of Debian 
> to another (e.g. Buster 10 to Bullseye 11). As I am going to need to run 
> this script at some point (I am still running Buster/10 on my systems), 
> I thought I'd ask the Debian user brain trust to comment/critique the 
> scripted steps. So here they are:
>
>
> ############### Start
> apt -y install aptitude
> aptitude search \'~o\'
> apt update
> apt -y upgrade
> apt -y full-upgrade
> dpkg -C
> apt-mark showhold
> #
> Update sources.list
> #
> Update files in sources.list.d
> (I don't even have this part started yet....didn't know I needed it the 
> last time I ran it)
> #
> apt-get check
> apt update
> apt list --upgradable
> apt-get check
> apt -y upgrade
> apt -y full-upgrade
> aptitude search \'~o\'
> ############### End
>
> Thoughts/critique/criticism/flames/etc
>

Hi John, here are my suggestions:

You can use apt, apt-get, or aptitude to run the commands that do most of the work, and in your script you chose apt for that task. I recall reading that they do not all use the same algorithm to determine which packages to upgrade and in what order, at each stage of the upgrade. I think I read somewhere that aptitude has the best algorithm, but apt-get is more suitable for a script. I don't remember if there are advantages or disadvantages to using apt. So you should do a little research to try to find the most up-to-date information about the pros and cons of the different apt related tools. The Debian wiki has a page on that, I think. Also, you might want to make sure you record the upgrade session in a logfile so you can examine what the script actually did in case there are problems. And of course, backup or take a snapshot beforehand so you can restore the system back to a working state in case things get broken badly.

HTH,

Chuck


Reply to: