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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-22-2017, 06:52 AM
|
#1
|
Member
Registered: Dec 2016
Posts: 242
Rep: 
|
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)?
|
|
|
07-22-2017, 09:18 AM
|
#2
|
Senior Member
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 22 MATE, Peppermint OS-Devuan, EndeavourOS, antiX
Posts: 4,552
|
eco_bach,
Essentially they amount to the same thing.
Either:
System > Administration > Software & Updates
OR
Code:
sudo apt-get update && sudo apt-get upgrade
|
|
|
07-22-2017, 11:25 AM
|
#3
|
Member
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229
Rep: 
|
Quote:
Originally Posted by eco_bach
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.
|
|
|
07-22-2017, 03:16 PM
|
#4
|
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
|
Quote:
Originally Posted by dejank
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.
|
|
|
07-22-2017, 03:30 PM
|
#5
|
Member
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229
Rep: 
|
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 03:33 PM.
|
|
|
07-22-2017, 05:24 PM
|
#6
|
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
|
Ubuntu perhaps, but not debian
Quote:
Originally Posted by dejank
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.
|
|
|
07-22-2017, 05:34 PM
|
#7
|
LQ Guru
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
|
@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.
|
|
|
07-22-2017, 05:41 PM
|
#8
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep: 
|
Well, my rule has always been
if there's a "dist" involved, the toaster will likely need to be rebooted
|
|
|
07-22-2017, 05:50 PM
|
#9
|
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
|
@hydrurga Thanks for the clarification.
|
|
|
07-22-2017, 06:02 PM
|
#10
|
Member
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229
Rep: 
|
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.
|
|
|
07-22-2017, 06:07 PM
|
#11
|
Member
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229
Rep: 
|
Quote:
Originally Posted by hydrurga
@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.
|
07-22-2017, 06:17 PM
|
#12
|
Moderator
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,031
|
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.
|
07-22-2017, 07:07 PM
|
#13
|
LQ Guru
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
|
Quote:
Originally Posted by dejank
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.
|
|
|
All times are GMT -5. The time now is 11:01 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|