sudo apt-get update/upgrade vs System> Administration>Software&Updates
Linux - NewbieThis 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.
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.
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.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
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.
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.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.