apt-get update and apt-get dist-upgrade
NoOp
glgxg at sbcglobal.net
Tue Sep 14 23:06:34 UTC 2010
On 09/14/2010 03:08 PM, Tom H wrote:
> On Tue, Sep 14, 2010 at 5:55 PM, Patton Echols <p.echols at comcast.net> wrote:
>> On 09/14/2010 10:41 AM, NoOp wrote:
>>> On 09/13/2010 09:56 PM, Kaushal Shriyan wrote:
>>>>
>>>> What exactly apt-get update and apt-get dist-upgrade do and when
>>>> should we use it.
>>>
>>> http://manpages.ubuntu.com/manpages/lucid/en/man8/apt-get.8.html
>>> https://help.ubuntu.com/community/AptGet/Howto
>>>
>>> Note: The comments in the last regarding 'apt-get dist-upgrade' are only
>>> partially correct; the command will perform an upgrade to a newer
>>> version only if the appropriate files (/etc/apt/sources.list), contains
>>> references to a newer release package.
>>
>> So if I understand correctly: The system I am typing on is still
>> running karmic. There is no reference in my sources.list to lucid, so
>> running # apt-get dist-upgrade would NOT update my system to lucid.
>> Right?
>
> Yes.
And you can easily test by using the '-s' (simulate) in the command. For
example:
$ sudo apt-get -s dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
udisks
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Note: I have udisks pinned so that I can still use floppies on my
system, other wise it would have no included that line.
That was from a fully upgraded lucid system. The following is from a
hardy 8.04 system that can be updated of course to intrepid, karmic, lucid:
$ sudo apt-get -s dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
and without the simulate:
$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
And on that hardy system, if I run update-manager I can see that it's
telling me "New distribution release '8.10' is available" and has an
'Upgrade' button should I wish to go ahead and do a release upgrade via
that method.
>
>> This raises the question, I think, of when I would use dist-upgrade
>> instead of upgrade. Perhaps if something was not working or I was
>> experiencing conflicts?
>
> Or to ensure that a package is upgraded. See the 4th ".".
>
> "apt-get upgrade":
> . currently installed packages are upgraded
> . currently installed packages are not removed
> . currently not installed packages are not installed
> . currently installed packages are not upgraded if they cannot be
> upgraded without installing or uninstalling another package
>
More information about the ubuntu-users
mailing list