Update commands sequence - was - Re: The Register : Article on a CUPS bug..
Bret Busby
bret at busby.net
Sun Sep 29 08:08:35 UTC 2024
On 29/9/24 04:20, Ralf Mardorf via ubuntu-users wrote:
> 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".
>
The use of the reboot command ("shutdown -r now"), is for only, as I
stated in my post,"when doing a system update involving rebooting" - I
only reboot when updating the kernel, and/or the intel microcode, which
require reboots, and, I only update them, when I have to reboot the
system, such as when firefox crashes and leaves gunk in the system
memory, requiring a system reboot, and, the reason for leaving those
updates until I have to reboot, is that, when I have to reboot the
system, to reinstate the system state, including restoring the firefox
session, usually takes several hours.
Otherwise, I generally use the System Update facility for updating
packages, that do not require a system reboot, as, for the packages that
I know to require a system reboot when updating, I deselect them, to
leave them until I have to do a system reboot.
Similarly, I only update firefox, when an update is available, when
firefox has crashed, and, has not left gunk in the system memory, or,
when I have to do a system reboot, such to clean out the gunk left by a
firefox crash, or, when I have to do a system reboot that involves
kernel and.or intel microcode updating.
And, also, a firefox update and/or kernel and/or intel microcode update,
requiring a reboot, is done, when I get a system freeze, and, have to do
a hard shutdown (turning off the power supply), when the system has been
gunked up by javascript, with the infliction of javascript, being like
pouring sugar into the fuel tank of a car fuelled by petrol.
..
Bret Busby
Armadale
West Australia
(UTC+0800)
..............
More information about the ubuntu-users
mailing list