Updating Linux.

old timer

Active Member
Joined
Oct 13, 2021
Messages
151
Reaction score
230
Credits
1,157
Hello forums,

sudo apt update && sudo apt upgrade VS update manager any advantage between one over the other.

Thanks
 


kc1di

Well-Known Member
Joined
May 14, 2021
Messages
453
Reaction score
415
Credits
3,200
It sort of depends on the distro your using. Some distros prefer you use the update manager for upgrades, such as Mint.
 

brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
1,178
Reaction score
895
Credits
8,757
both will do the job, however with distributions that have their own repositories you are safer using the update manage as some of the apps will be modified for that particular build
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
3,969
Reaction score
3,643
Credits
31,925
Even in Mint, I do it all in the terminal. Regardless of distro, I do it in the terminal.

I just find it easier. You can even alias it, making it just a single word like 'update'.
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
6,595
Reaction score
5,353
Credits
19,391
A bit confusing wouldn't both terminal and update manager go to the same repository for updates.

They do indeed, as does Synaptic Package Manager, which is another (GUI-based) option for running Updates.

Note to helpers, the OP is on LXLE unless he has changed it.

For seven years, with Debian-based distros such as yours, I have been running a Bash script out of Terminal.

It reads as follows

Code:
#!/bin/bash
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove

The script is named upd and is stored in either of /usr/local/bin or /home/chris/.local/bin both of which are in my PATH, so all I have to do is type

upd

and enter my password and away she goes.

By widening the Terminal screen from its handles, I can also monitor my download speeds.

Cheers

Chris
 

rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
452
Reaction score
398
Credits
1,685
Even in Mint, I do it all in the terminal. Regardless of distro, I do it in the terminal.

I just find it easier. You can even alias it, making it just a single word like 'update'.
You can't use words that exist in the system, "update" being one of them, especially in Mint where the main command is "sudo apt update". That confuses the system what you wanna do. I've already tried that in Mint and it caused errors. But you can abbreviate the words, for instance "update" can be worded as "upd" for the alias and then it will work as expected.
 
OP
old timer

old timer

Active Member
Joined
Oct 13, 2021
Messages
151
Reaction score
230
Credits
1,157
Note to helpers, the OP is on LXLE unless he has changed it.
Yep on one computer using LXLE.

I've been testing out other Linux distros on the other desktop.
Ubuntu
Xubuntu,
MX Linux
Linux Mint
Seem to all work well.

I've also been trying different stuff in the terminal and rolling through the forums and learning about the maintenance terminal commands interesting stuff to this new Linux user.

Code:
#!/bin/bash
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove

Chris

OK I understand what these do (updates everything)
Code:
sudo apt-get update
sudo apt-get -y upgrade


This one updates packages and removes older packages correct.
Code:
sudo apt-get -y dist-upgrade


This one clears out and removes the packages that were upgraded correct.
Code:
sudo apt-get -y autoremove
 
Last edited:

brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
1,178
Reaction score
895
Credits
8,757

kc1di

Well-Known Member
Joined
May 14, 2021
Messages
453
Reaction score
415
Credits
3,200
Yep on one computer using LXLE.

I've been testing out other Linux distros on the other desktop.
Ubuntu
Xubuntu,
MX Linux
Linux Mint
Seem to all work well.

I've also been trying different stuff in the terminal and rolling through the forums and learning about the maintenance terminal commands interesting stuff to this new Linux user.



OK I understand what these do (updates everything)
Code:
sudo apt-get update
sudo apt-get -y upgrade


This one updates packages and removes older packages correct.
Code:
sudo apt-get -y dist-upgrade


This one clears out and removes the packages that were upgraded correct.
Code:
sudo apt-get -y autoremove
autoremove deletes packages that are no longer needed. If you have upgrade or deleted a package that had dependencies that are no longer needed for instance.
Some distros us dist-upgrade for kernel upgrades and other higher level upgrades and some use this one to upgrade from on version to the next. say from 20.1 to 20.2 etc.
 
OP
old timer

old timer

Active Member
Joined
Oct 13, 2021
Messages
151
Reaction score
230
Credits
1,157
bloody hell son, you have certainly caught the bug :D
Yeah I figured try some different Linux distros from the start and then settle on one or two different ones.

MX Linux is an interesting Linux distro and seems to come with all the software you would ever need and the quickest running of the lot I've tried so it may become a keeper.
 
OP
old timer

old timer

Active Member
Joined
Oct 13, 2021
Messages
151
Reaction score
230
Credits
1,157
autoremove deletes packages that are no longer needed. If you have upgrade or deleted a package that had dependencies that are no longer needed for instance.
Some distros us dist-upgrade for kernel upgrades and other higher level upgrades and some use this one to upgrade from on version to the next. say from 20.1 to 20.2 etc.
I found a page that explained all of these commands but failed to save it. :(
I can see where the Terminal is a powerful tool once mastered.
 

brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
1,178
Reaction score
895
Credits
8,757
MX Linux is an interesting Linux distro
sure is, you will have noticed I recommend it fairly often, firstly because the 32 bit version runs well on modratly old kit, second because the AHS version contains more and mostly recent drivers for people with new kit, and finally, being aimed primarily as an office build, it has some interesting built in security.
[you may have noticed , if you try to install additional applications as user it wont let you, it has to be done as root]
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
3,969
Reaction score
3,643
Credits
31,925
You can't use words that exist in the system, "update" being one of them, especially in Mint where the main command is "sudo apt update"

Of course you can. Not only can you, I do.

Update is a modifier for apt.

Selection_015.png
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
3,849
Reaction score
2,603
Credits
27,830
I created an alias for updating all the default repository packages and AUR packages on my system
Code:
pupdate: aliased to aur sync -c -u && sudo pacman -Syu
 
Last edited:

craigevil

Well-Known Member
Joined
Feb 24, 2021
Messages
272
Reaction score
274
Credits
1,873
You can't use words that exist in the system, "update" being one of them, especially in Mint where the main command is "sudo apt update". That confuses the system what you wanna do. I've already tried that in Mint and it caused errors. But you can abbreviate the words, for instance "update" can be worded as "upd" for the alias and then it will work as expected.
I am not on Mint, but I use update as an alias for sudo apt update, and upgrade for sudo apt upgrade
I also use purge for sudo apt autoremove -y.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
3,969
Reaction score
3,643
Credits
31,925

That reminds me... I want to do an article about aliases, specifically .bash_aliases, but I'd want to do some extensive testing in different distros.
 
OP
old timer

old timer

Active Member
Joined
Oct 13, 2021
Messages
151
Reaction score
230
Credits
1,157
sure is, you will have noticed I recommend it fairly often, firstly because the 32 bit version runs well on modratly old kit, second because the AHS version contains more and mostly recent drivers for people with new kit, and finally, being aimed primarily as an office build, it has some interesting built in security.
[you may have noticed , if you try to install additional applications as user it wont let you, it has to be done as root]
I have noticed and understand why.

I have the MX 21 new released a few days ago although I'm finding a few bugs however to be expected since it's only a few days released and I don't expect it to be 100% at the moment.

The bugs are minor and are easy to live with and I'm sure they will get fixed.

All the software I needed came right out of the MX reposatory as that is the suggested method out of the user manual.

Hell as it comes OOTB it pretty complete software wise and has more than I'd ever need and use.

All of the Linux distros I've tried run well and I'm learning that the desktop enviroment makes a big difference on system resource usage.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!


Top