You are not logged in.

#1 2016-05-21 19:55:24

tmq
Member
Registered: 2015-12-05
Posts: 7

upgrade vs. dist-upgrade

Some time ago my impression from pavroo (Sparky linux) was that sudo apt-get upgrade only updates the installed packages, while sudo apt-get dist-upgrade brings in new (?) dependences as needed. Furthermore my understanding is that one always should run sudo apt-get update before running either of the other two commands. Do I understand this matter correctly? What are the pros & cons of running *upgrade vs. *dist-upgrade?

Offline

#2 2016-05-21 20:09:24

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: upgrade vs. dist-upgrade

BunsenLabs is based on Debian stable and so `dist-upgrade` shouldn't usually be needed at all.

Simply run `apt-get upgrade` and check the terminal output to see if there are any "packages left un-upgraded" -- if there are then you may need to run `apt-get dist-upgrade` as well but I have never needed to do this in my BunsenLabs systems.

And yes, `apt-get update` is required before running either command.

For a detailed description of the differences between `apt-get upgrade` and `apt-get dist-upgrade`, see apt-get(8)

Offline

#3 2016-05-21 20:10:48

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: upgrade vs. dist-upgrade

You need to run 'update' first, or the other commands won't know if there have been changes since the last time.

From 'man apt-get':

       upgrade
           upgrade is used to install the newest versions of all packages currently
           installed on the system from the sources enumerated in /etc/apt/sources.list.
           Packages currently installed with new versions available are retrieved and
           upgraded; under no circumstances are currently installed packages removed, or
           packages not already installed retrieved and installed. New versions of currently
           installed packages that cannot be upgraded without changing the install status of
           another package will be left at their current version. An update must be
           performed first so that apt-get knows that new versions of packages are
           available.

       dist-upgrade
           dist-upgrade in addition to performing the function of upgrade, also
           intelligently handles changing dependencies with new versions of packages;
           apt-get has a "smart" conflict resolution system, and it will attempt to upgrade
           the most important packages at the expense of less important ones if necessary.
           The dist-upgrade command may therefore remove some packages. The
           /etc/apt/sources.list file contains a list of locations from which to retrieve
           desired package files. See also apt_preferences(5) for a mechanism for overriding
           the general settings for individual packages.

Generally, a Stable system rarely needs a dist-upgrade. However, BL is still evolving a little, so there may be package updates. It is often recommended to use the "-s/--simulate" switch.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#4 2016-05-22 01:18:56

Tony
Member
From: Saskatchewan, Canada
Registered: 2016-04-22
Posts: 15

Re: upgrade vs. dist-upgrade

Just to confirm, I have been using the Synaptic Package Manager to install updates. Is "sudo apt-get upgrade" the same as checking "Status" and reloading in the Manager? When it gives me updates I have been installing them, are they the correct updates? Also does the Manager handle the packages that can be removed? Looks like it does.

Offline

#5 2016-05-22 08:49:57

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: upgrade vs. dist-upgrade

Tony wrote:

Just to confirm, I have been using the Synaptic Package Manager to install updates. Is "sudo apt-get upgrade" the same as checking "Status" and reloading in the Manager? When it gives me updates I have been installing them, are they the correct updates? Also does the Manager handle the packages that can be removed? Looks like it does.

1) Synaptic is a gui for the apt commands;

2) I guess "Status" shows the output of 'apt-get update';

3) "...the correct updates"? That is the way that apt works;

4) Removing packages... See 3). However, depending on your sources.list (eg if you have added other sources in there), or dist-upgrade, the result may not be what you want/expect.

If you are running Stable, and don't mess with sources, then just carry on without worrying about it IMO. update/upgrade, with the occasional dist-upgrade should be fine.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#6 2016-05-22 09:24:06

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: upgrade vs. dist-upgrade

Tony wrote:

Just to confirm, I have been using the Synaptic Package Manager to install updates. Is "sudo apt-get upgrade" the same as checking "Status" and reloading in the Manager? When it gives me updates I have been installing them, are they the correct updates? Also does the Manager handle the packages that can be removed? Looks like it does.

synaptic works like this:
the "Reload" button is the equivalent of apt-get update.
then you should press "Mark all Upgrades".
then, pressing the "Apply" button is the equivalent of apt-get upgrade.

removing unneeded packages is done with apt-get autoremove - i don't think synaptic has an equivalent for that.
ergo: it's better to use the command line for system maintenance.

Last edited by ohnonot (2016-05-22 09:24:26)

Offline

#7 2016-05-22 09:45:08

nobody
The Great
Registered: 2015-08-10
Posts: 3,655

Re: upgrade vs. dist-upgrade

In the context of BL, running dist-upgrade makes sense because we might remove or add dependencies to packages. That also applies when using packages from 3rd-party repositories, backports repositories, or the testing and unstable distributions.

In practice, on a pure Debian stable system, there should be absolutely no difference or danger in running dist-upgrade over upgrade because of the package maintenance policies governing packages that have already been accepted into the stable distribution -- dependencies usually do not change.

Prefer upgrade over dist-upgrade when doing unattended upgrades or something like that. Otherwise, I would recommend to prefer dist-upgrade because it works smarter -- see the man page excerpt quoted by damo above.

Offline

#8 2016-05-22 14:08:33

theodore
Member
Registered: 2016-04-01
Posts: 14

Re: upgrade vs. dist-upgrade

dist-upgrade`s recommended in sid branch becuase of sid`s speed of change but for stable branch which`s also bunsenlabs branch there`s no real difference,
though in stable with backports enabled maybe its better to be more agressive,
so dist-upgrade,
most imporant thing`s your repo list.if that`s alright then your system`s alright in upgradings.

Offline

#9 2016-05-22 16:56:02

paxmark1
Member
Registered: 2015-10-02
Posts: 45

Re: upgrade vs. dist-upgrade

http://sparkylinux.org/forum/index.php/ … ml#msg4051   

Sparky is mostly Debian testing, so if you are in testing you can always use  the -s (simulate) and -d (download only) options .  -s and -d works for both apt-get and apt. 

I use apt-get dist-upgrade at times in stable to make sure I get backports, but that might be overkill.

peace out

Offline

#10 2016-06-05 03:21:38

tmq
Member
Registered: 2015-12-05
Posts: 7

Re: upgrade vs. dist-upgrade

I am using BL stable. I simply cited Sparky because that was where my question originated (I was seriously considering Sparky after CB's demise). In a particular instance I used synaptic and tweaked the system beyond what was helpful, ahem. In retrospect I should have used the Sparky update manager. Thanks for the great information.

Offline

#11 2016-06-05 12:45:04

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,028

Re: upgrade vs. dist-upgrade

@ paxmark1 - good stuff for SID as well.  Toss in apt-listbugs and things get better.  wink

I use it with Bunsen as well.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

Board footer

Powered by FluxBB