Update commands sequence - was - Re: The Register : Article on a CUPS bug..

Ralf Mardorf kde.lists at yahoo.com
Sat Sep 28 20:20:00 UTC 2024


On Sat, 2024-09-28 at 12:56 -0700, MR ZenWiz wrote:
> On Sat, Sep 28, 2024 at 11:56 AM Bret Busby <bret at busby.net> wrote:
> > 
> :
> > I believe and suggest that the following command sequence is
> > preferable,
> > when doing a system update involving rebooting;
> > 
> > sudo -i
> > apt update
> > apt full-upgrade -y
> > apt autoremove -y
> > apt autoclean
> > shutdown -r now
> > 
> > I believe that this leaves the system in a cleaner state.
> > 
> > More knowledgeable people than me, may care to comment on this.
> 
> I could be mistaken, but I believe the auoremove and autoclean are
> more effective after the reboot.

>From a script that I wrote and that I used to use:

        [snip]
        color="-o APT::Color=0"
        keepp="-o APT::Keep-Downloaded-Packages=1 "
        quiet=""
        case $1 in
          -q*|--quiet)
            quiet="-qq ";;
        esac
        [snip]
            sudo apt update $quiet$color && \
            sudo apt-file update && \
            sudo auto-apt updatedb && \
            sudo auto-apt update-local && \
            sudo apt full-upgrade $keepp$color && \
            sudo apt autoremove $color;;
        [snip]

Apart from this I managed the cache in my very own way and on demand
cleaned the cache, hence I will not comment on any kind of cleaning.

However, what I never ever would do is using the "-y" option and I never
ever would assume that an update necessarily requires a reboot.

IOW consider to remove the "-y" and the "shutdown -r now".




More information about the ubuntu-users mailing list