LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-22-2017, 07:52 AM   #1
eco_bach
Member
 
Registered: Dec 2016
Posts: 229

Rep: Reputation: Disabled
sudo apt-get update/upgrade vs System> Administration>Software&Updates


Hi
I routinely use System> Administration>Software&Updates in my Linux install (Ubuntu 16.04 LTS) to update any necessary system software and drivers.

Is it also necessary to issue a sudo apt-get update , sudo apt-get upgrade in my terminal periodically as well?

Or are these 2 actions essentially performing the same task(s)?
 
Old 07-22-2017, 10:18 AM   #2
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 19.2 MATE, MX-19, Manjaro
Posts: 2,712
Blog Entries: 14

Rep: Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984
eco_bach,

Essentially they amount to the same thing.

Either:

System > Administration > Software & Updates

OR

Code:
sudo apt-get update && sudo apt-get upgrade
 
Old 07-22-2017, 12:25 PM   #3
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by eco_bach View Post
Hi
I routinely use System> Administration>Software&Updates in my Linux install (Ubuntu 16.04 LTS) to update any necessary system software and drivers.

Is it also necessary to issue a sudo apt-get update , sudo apt-get upgrade in my terminal periodically as well?

Or are these 2 actions essentially performing the same task(s)?
More, or less same. But, I'm not sure how software center in ubuntu handles updates that require installation of new packages. Sometimes, sudo apt-get update && sudo apt-get upgrade is not enough, and you need to use sudo apt-get dist-upgrade. It happens, for example, when there is new kernels in your update, or when upgrading some package requires installation of some new library.
 
Old 07-22-2017, 04:16 PM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,511

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
Quote:
Originally Posted by dejank View Post
Sometimes, sudo apt-get update && sudo apt-get upgrade is not enough, and you need to use sudo apt-get dist-upgrade. It happens, for example, when there is new kernels in your update, or when upgrading some package requires installation of some new library.
Incorrect! dist-upgrade is used when when another major version of the distro is released. Kernel upgrades and library upgrades are handled just fine by upgrade by itself.
 
Old 07-22-2017, 04:30 PM   #5
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
Incorrect! dist-upgrade is used when when another major version of the distro is released. Kernel upgrades and library upgrades are handled just fine by upgrade by itself.
You obviously know about apt-get less than you think. apt-get dist-upgrade is not used just for major distro upgrades, even if its name often mislead people to think so. It is there to handle every situation where there is need for installation of new packages during upgrades, as well as removing of existing ones, due to change in dependencies. While those situations are less common and almost non existent on, for example Debian stable, they are quite common on Debian testing and Ubuntu/Mint and similar systems, who change more often to newer versions of packages. Also, you obviously missed important part in my statement about kernels and libraries. I specified clearly that I'm talking about NEW kernels and libraries.

Last edited by dejank; 07-22-2017 at 04:33 PM.
 
Old 07-22-2017, 06:24 PM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,511

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
Ubuntu perhaps, but not debian

Quote:
Originally Posted by dejank View Post
You obviously know about apt-get less than you think. apt-get dist-upgrade is not used just for major distro upgrades, even if its name often mislead people to think so. It is there to handle every situation where there is need for installation of new packages during upgrades, as well as removing of existing ones, due to change in dependencies. While those situations are less common and almost non existent on, for example Debian stable, they are quite common on Debian testing and Ubuntu/Mint and similar systems, who change more often to newer versions of packages. Also, you obviously missed important part in my statement about kernels and libraries. I specified clearly that I'm talking about NEW kernels and libraries.
I've been using Debian testing since woody. During that time I has used --dist-upgrade once. I guess I've been wrong all this time!

Apparently it is possible to use dist-upgrade in other contexts that moving from one major version to the next, although I have never seen any documented use for it other than that.
 
Old 07-22-2017, 06:34 PM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,018
Blog Entries: 5

Rep: Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870
@Awesome Machine, dejank

I may be wrong here, but the confusion might be related to the use of generic packages to keep track of the latest kernel versions.

If the following packages are installed:

linux-base
linux-firmware
linux-generic
linux-headers-generic
linux-image-generic

then the dependencies of these always point at the current versions of the kernel etc. So, if these dummy packages are installed on your system then you only need a sudo apt-get upgrade to upgrade the kernel version.
 
Old 07-22-2017, 06:41 PM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Well, my rule has always been
if there's a "dist" involved, the toaster will likely need to be rebooted
 
Old 07-22-2017, 06:50 PM   #9
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,511

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
@hydrurga Thanks for the clarification.
 
Old 07-22-2017, 07:02 PM   #10
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
I've been using Debian testing since woody. During that time I has used --dist-upgrade once. I guess I've been wrong all this time!

Apparently it is possible to use dist-upgrade in other contexts that moving from one major version to the next, although I have never seen any documented use for it other than that.
Well, it is never too late to learn something new :P Anyway, if you were using just stable versions of debian, chances are that only times you've needed apt-get dist-upgrade is when you were upgrading to new versions. But if you were/are using testing/sid as it is in your list of distributions, then you should follow your regular routine of apt-get update && apt-get upgrade with apt-get dist-upgrade at least once per week. And that is advised and documented, though can't remember out of my head exactly where, would have to search net for it. Some packages simply need new stuff to get upgraded, others are improved in a way that some libraries that were dependencies are no longer needed. And those situations require apt-get dist-upgrade, or aptitude full-upgrade.
 
Old 07-22-2017, 07:07 PM   #11
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
@Awesome Machine, dejank

I may be wrong here, but the confusion might be related to the use of generic packages to keep track of the latest kernel versions.

If the following packages are installed:

linux-base
linux-firmware
linux-generic
linux-headers-generic
linux-image-generic

then the dependencies of these always point at the current versions of the kernel etc. So, if these dummy packages are installed on your system then you only need a sudo apt-get upgrade to upgrade the kernel version.
No confusion here, because that is wrong too. As an obvious example: https://askubuntu.com/questions/8158...-upgrade#81594. If it is regular update of kernel, simply patch of current version, regular apt-get upgrade will be enough. If it is newer kernel, you need apt-get dist-upgrade/aptitude full-upgrade.
 
1 members found this post helpful.
Old 07-22-2017, 07:17 PM   #12
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, KDE Neon, Arch, Void
Posts: 3,255

Rep: Reputation: 1036Reputation: 1036Reputation: 1036Reputation: 1036Reputation: 1036Reputation: 1036Reputation: 1036Reputation: 1036
upgrade: will upgrade existing packages, and that is all. If an upgraded package now depends on a package that isn't installed, it won't upgrade. If a package is replaced by another package, won't install. Will ONLY upgrade existing packages.

dist-upgrade: Will upgrade all existing packages, including installing any new packages they depend on. Thus if linux-image-amd64 is installed, and it's dependency goes from linux-image-4.9.0-amd64 to linux-image-4.11.0-amd64, it will upgrade to the 4.11 kernel. Apt(-get) upgrade would not, as the package that linux-image-amd64 depends on was not previously installed.

If running only stable repo's, this SHOULDN'T matter, as once released they don't upgrade the kernel versions other than patch levels. If running testing/sid, it's always recommended to use dist-upgrade due to this limitation of upgrade and how often packages are replaced in those repos. If you're using backports for a lot of stuff, I don't know that I've ever heard an official recommendation, but my personal thought is if you're pinning anything to backports, especially if it's kernels, use dist-upgrade.
 
1 members found this post helpful.
Old 07-22-2017, 08:07 PM   #13
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,018
Blog Entries: 5

Rep: Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870
Quote:
Originally Posted by dejank View Post
No confusion here, because that is wrong too. As an obvious example: https://askubuntu.com/questions/8158...-upgrade#81594. If it is regular update of kernel, simply patch of current version, regular apt-get upgrade will be enough. If it is newer kernel, you need apt-get dist-upgrade/aptitude full-upgrade.
Oops. Acknowledged. Thanks for putting me straight.
 
  


Reply

Tags
ubuntu 16.04


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Offline apt-get update && apt-get upgrade M0nteZ Linux - Software 4 08-12-2016 07:41 PM
[SOLVED] 404errors when running apt-get update already tried sudo rm /var/lib/apt/lists/* -vf rasec8711 Linux - Software 2 05-31-2012 11:33 AM
[SOLVED] System>Administration>Software Update rmknox Linux - Newbie 4 08-17-2010 01:05 AM
sudo apt-get update && sudo apt-get upgrade hallve_revera Linux - Newbie 6 01-10-2009 10:37 AM
trouble getting security updates from sudo apt-get xyla Linux - Newbie 2 07-17-2008 06:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration