I like to update system in terminal not GUI

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
f23948
Level 2
Level 2
Posts: 69
Joined: Sun Apr 24, 2022 3:53 pm

I like to update system in terminal not GUI

Post by f23948 »

I like to update system in terminal. I do not want to use update manager GUI.

Code: Select all

sudo apt update && sudo apt upgrade -y
User avatar
xenopeek
Level 25
Level 25
Posts: 27361
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: I like to update system in terminal not GUI

Post by xenopeek »

That's fine, you can upgrade how you like. Considering setting up Timeshift so you can roll back when an update causes a problem. Mind that if you have flatpaks installed and you've not set in Update Manager to automatically update them, you have to do that yourself as well with command flatpak update.

Also, apt doesn't need to be called with sudo. It invokes sudo itself when it's needed. Saves some typing.

Update Manager also has a CLI, try the mintupdate-cli command.
Image
User avatar
all41
Level 18
Level 18
Posts: 8053
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: I like to update system in terminal not GUI

Post by all41 »

f23948 wrote:
Tue Jun 21, 2022 11:04 am
I like to update system in terminal. I do not want to use update manager GUI.

Code: Select all

sudo apt update && sudo apt upgrade -y
I do pretty much the same but after apt update I run apt list --upgradeable
to see what is going to be downloaded.
Everything is difficult before it gets easy.
vanadium
Level 4
Level 4
Posts: 242
Joined: Sun Dec 27, 2015 1:07 pm

Re: I like to update system in terminal not GUI

Post by vanadium »

xenopeek wrote:
Tue Jun 21, 2022 11:19 am
Also, apt doesn't need to be called with sudo. It invokes sudo itself when it's needed. Saves some typing.
You mean "flatpak". For "apt" it does not work this way.
User avatar
all41
Level 18
Level 18
Posts: 8053
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: I like to update system in terminal not GUI

Post by all41 »

vanadium wrote:
Tue Jun 21, 2022 11:36 am
xenopeek wrote:
Tue Jun 21, 2022 11:19 am
Also, apt doesn't need to be called with sudo. It invokes sudo itself when it's needed. Saves some typing.
You mean "flatpak". For "apt" it does not work this way.
In a terminal run apt-update vs sudo apt-update
Everything is difficult before it gets easy.
User avatar
xenopeek
Level 25
Level 25
Posts: 27361
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: I like to update system in terminal not GUI

Post by xenopeek »

vanadium wrote:
Tue Jun 21, 2022 11:36 am
You mean "flatpak". For "apt" it does not work this way.
It does for Linux Mint's apt.
Image
User avatar
f23948
Level 2
Level 2
Posts: 69
Joined: Sun Apr 24, 2022 3:53 pm

Re: I like to update system in terminal not GUI

Post by f23948 »

xenopeek wrote:
Tue Jun 21, 2022 11:19 am
That's fine, you can upgrade how you like. Considering setting up Timeshift so you can roll back when an update causes a problem. Mind that if you have flatpaks installed and you've not set in Update Manager to automatically update them, you have to do that yourself as well with command flatpak update.

Also, apt doesn't need to be called with sudo. It invokes sudo itself when it's needed. Saves some typing.

Update Manager also has a CLI, try the mintupdate-cli command.
Thank you
vanadium
Level 4
Level 4
Posts: 242
Joined: Sun Dec 27, 2015 1:07 pm

Re: I like to update system in terminal not GUI

Post by vanadium »

xenopeek wrote:
Tue Jun 21, 2022 11:46 am
It does for Linux Mint's apt.
I see. Mint has a python wrapper script for "apt" in /usr/local/bin.
User avatar
xenopeek
Level 25
Level 25
Posts: 27361
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: I like to update system in terminal not GUI

Post by xenopeek »

vanadium wrote:
Wed Jun 22, 2022 3:25 am
I see. Mint has a python wrapper script for "apt" in /usr/local/bin.
It predates the /usr/bin/apt command by some years and wraps apt, aptitude, dpkg and several other package management commands in one convenient command. Type apt to see all it can do.
Image
t42
Level 8
Level 8
Posts: 2029
Joined: Mon Jan 20, 2014 6:48 pm

Re: I like to update system in terminal not GUI

Post by t42 »

Maybe apt full-upgrade can be recommended instead of apt upgrade ?
-=t42=-
User avatar
xenopeek
Level 25
Level 25
Posts: 27361
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: I like to update system in terminal not GUI

Post by xenopeek »

As per the manpage: "full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole."

You shouldn't need this when installing updates on current release. Only when upgrading between releases.
Image
pbear
Level 16
Level 16
Posts: 6559
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: I like to update system in terminal not GUI

Post by pbear »

FWIW, smurphos interprets the same man page a bit differently (continued here).
User avatar
xenopeek
Level 25
Level 25
Posts: 27361
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: I like to update system in terminal not GUI

Post by xenopeek »

pbear wrote:
Thu Jun 23, 2022 2:12 am
FWIW, smurphos interprets the same man page a bit differently (continued here).
How is that different? He quotes the same part of the manpage as explanation.
Image
pbear
Level 16
Level 16
Posts: 6559
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: I like to update system in terminal not GUI

Post by pbear »

xenopeek wrote:
Thu Jun 23, 2022 2:30 am
pbear wrote:
Thu Jun 23, 2022 2:12 am
FWIW, smurphos interprets the same man page a bit differently (continued here).
How is that different? He quotes the same part of the manpage as explanation.
For one thing, he doesn't speak of full-upgrade (apt-get dist-upgrade) as limited to or only appropriate for system point upgrades. Also, he quotes the man page entries for upgrade alongside the quotes for full-upgrade and dist-upgrade, which suggests they are alternatives and which to choose depends on which decision rule one wants applied.

Notably, as you know, upgrade won't upgrade a package if doing so requires removal of an installed package. So, when full-upgrade speaks of "the system as a whole," seems to me it's talking about how to upgrade as many packages as possible while still having a functioning system. To be clear, that's my own interpretation, not something I'm attributing to smurphos.

For purposes of this thread, the better question might be: Which rule does Synaptic (and therefore Update Manager) use? Unless one is a serious package jockey (I'm not), that's probably the best rule to be using in Terminal.

ETA: Looking in Synaptic (Setting > Preferences), I see the default for system upgrade is "Smart Upgrade," as opposed to "Default Upgrade" and "Always Ask." Never have understood why Synaptic insists on relabeling options, but Smart Upgrade sounds like full-upgrade to me.
User avatar
f23948
Level 2
Level 2
Posts: 69
Joined: Sun Apr 24, 2022 3:53 pm

Re: I like to update system in terminal not GUI

Post by f23948 »

f23948 wrote:
Tue Jun 21, 2022 5:32 pm
xenopeek wrote:
Tue Jun 21, 2022 11:19 am
That's fine, you can upgrade how you like. Considering setting up Timeshift so you can roll back when an update causes a problem. Mind that if you have flatpaks installed and you've not set in Update Manager to automatically update them, you have to do that yourself as well with command flatpak update.

Also, apt doesn't need to be called with sudo. It invokes sudo itself when it's needed. Saves some typing.

Update Manager also has a CLI, try the mintupdate-cli command.
Thank you
Can I do it samething in LMDE?


Last bumped by f23948 on Fri Aug 05, 2022 7:39 pm.
Post Reply

Return to “Software & Applications”