LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   apt-get question: dist-upgrade vs upgrade (https://www.linuxquestions.org/questions/fedora-35/apt-get-question-dist-upgrade-vs-upgrade-219920/)

Arodef 08-19-2004 07:33 PM

apt-get question: dist-upgrade vs upgrade
 
apt-get upgrade
This command installs the latest versions of any out-of-date packages on your system. It never installs a package that is not yet installed.

apt-get dist-upgrade
This command installs up-to-date version of packages, and may install additional packages.

-----------------------

So does this mean dist-upgrade installs packages not installed on the system? If so, are those packages absolutely necessary? I need to keep the OS size small since I need to be able to backup the system to a single restore CD. I only want currently installed packages to be updated and packages improving the reliablilty/stability of the OS to be installed. Which one should I use? Thanks!

peace 08-19-2004 07:44 PM

Hi,

From the man-page:

"upgrade is used to install the newest versions of all packages currently installed on the system
...
dist-upgrade, in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages"

Quote:

I only want currently installed packages to be updated and packages improving the reliablilty/stability of the OS to be installed.
Dist-upgrade will not go and install every package under the sun.

Quote:

Which one should I use?
Well, if you want to do a distro-upgrade, use dist-upgrade. For instance, moving from Debian -stable to Debian -testing. Dist-upgrade is a special upgrade that is used if you are fetching packages from a new location, which is specified in /etc/apt/sources.list

If you want to simply upgrade the packages you have installed for your current distro, use 'apt-get upgrade'.

I hope that clears up your confusion.

rika3 04-07-2011 02:36 PM

updates kernel as well?
 
Does this command updates to latest kernel as well? I want to update my ubuntu to latest kernel.

TobiSGD 04-07-2011 03:34 PM

Quote:

Originally Posted by Arodef (Post 1120637)
If so, are those packages absolutely necessary? I need to keep the OS size small since I need to be able to backup the system to a single restore CD. I only want currently installed packages to be updated and packages improving the reliablilty/stability of the OS to be installed.

This depends on how you configured your apt. If apt installs recommends by default, it may be that an newly installed package is only a recommendation and as such not absolutely necessary. If you configured apt to not install recommends (which you should, if you are concerned about the size of the install) then a newly install package will be a dependency. In that case it is absolutely necessary.

Quote:

Does this command updates to latest kernel as well? I want to update my ubuntu to latest kernel.
If you want to upgrade to the latest kernel you should use dist-upgrade. But keep in mind that you will only get the kernel delivered with the version of Ubuntu with bugfixes. For example, if you have 10.04 installed you will not get a kernel newer than 2.6.32, with 10.10 you will not get another kernel as 2.6.35, and so on.

szboardstretcher 04-07-2011 03:36 PM

Just realized this thread is from 8 years ago...

rika3 04-07-2011 04:38 PM

I understand what you saying. It updates to latest kernel of current OS version loaded. Thanks you

Ophidion 10-27-2011 04:48 AM

I think "apt-get dist-upgrade" is equal to synaptic 'smart upgrade' option.

RockDoctor 10-29-2011 07:13 PM

Just tried an
Code:

apt-get -s dist-upgrade
on my F16 installation to see what it wanted to upgrade to Rawhide. The kernel was among "The following NEW packages will be installed:"

chuckyanutsup 03-07-2012 05:19 AM

It amazes me that people back in 2004 were asking the same questions I find myself asking now. Thanks for this thread, it's helped me understand a little more :)

Sector11 06-15-2012 01:33 PM

Quote:

Originally Posted by chuckyanutsup (Post 4620674)
It amazes me that people back in 2004 were asking the same questions I find myself asking now. Thanks for this thread, it's helped me understand a little more :)

But back in 04 Linux was only something I had heard about in passing and was for those "hacker geeks".

Oh how little I knew with the OtherOS blanket over my eyes. :)


All times are GMT -5. The time now is 10:47 PM.