Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #273999 > unrolled thread

Why does "apt-get upgrade {package}" upgrade all packages instead of error?

Started byDaniel Roberts <danielmroberts@gmail.com>
First post2024-10-24 19:40 +0200
Last post2024-10-25 01:30 +0200
Articles 5 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  Why does "apt-get upgrade {package}" upgrade all packages instead of error? Daniel Roberts <danielmroberts@gmail.com> - 2024-10-24 19:40 +0200
    Re: Why does "apt-get upgrade {package}" upgrade all packages instead  of error? Frank Weißer <linux@weisser-ol.de> - 2024-10-24 20:00 +0200
      Re: Why does "apt-get upgrade {package}" upgrade all packages instead  of error? Aldo Maggi <sentiniate@virgilio.it> - 2024-10-24 20:40 +0200
    Re: Why does "apt-get upgrade {package}" upgrade all packages instead  of error? Felix Miata <mrmazda@stanis.net> - 2024-10-24 20:50 +0200
    Re: Why does "apt-get upgrade {package}" upgrade all packages  instead of error? David Wright <deblis@lionunicorn.co.uk> - 2024-10-25 01:30 +0200

#273999 — Why does "apt-get upgrade {package}" upgrade all packages instead of error?

FromDaniel Roberts <danielmroberts@gmail.com>
Date2024-10-24 19:40 +0200
SubjectWhy does "apt-get upgrade {package}" upgrade all packages instead of error?
Message-ID<JB9Yt-3WQW-5@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hello,

I've run into this a few times over the years and it can be a headache to
resolve.

Passing a package name to "apt-get update" results in the response "E: The
update command takes no arguments". However, passing a package name to
"apt-get upgrade" results in the argument being ignored and all packages
upgraded.

Is there some reason that this is the case? Is it a bug that has
always existed and never fixed?

Dan

[toc] | [next] | [standalone]


#274000 — Re: Why does "apt-get upgrade {package}" upgrade all packages instead of error?

FromFrank Weißer <linux@weisser-ol.de>
Date2024-10-24 20:00 +0200
SubjectRe: Why does "apt-get upgrade {package}" upgrade all packages instead of error?
Message-ID<JBahP-3WXj-5@gated-at.bofh.it>
In reply to#273999
Hello Daniel,

# man apt-get

(german translation) doesn't tell anything else. apt-get upgrade 
upgrades ALL installed packages.

Kind regards

Frank

Daniel Roberts:
> Hello,
> 
> I've run into this a few times over the years and it can be a headache 
> to resolve.
> 
> Passing a package name to "apt-get update" results in the response "E: 
> The update command takes no arguments". However, passing a package name 
> to "apt-get upgrade" results in the argument being ignored and all 
> packages upgraded.
> 
> Is there some reason that this is the case? Is it a bug that has 
> always existed and never fixed?
> 
> Dan

[toc] | [prev] | [next] | [standalone]


#274002 — Re: Why does "apt-get upgrade {package}" upgrade all packages instead of error?

FromAldo Maggi <sentiniate@virgilio.it>
Date2024-10-24 20:40 +0200
SubjectRe: Why does "apt-get upgrade {package}" upgrade all packages instead of error?
Message-ID<JBaUx-3XpC-11@gated-at.bofh.it>
In reply to#274000
Actually the english version of "man apt-get" in the case of "upgrade" 
writes the following:

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.

*****           When a package is supplied as an argument, the package 
will be installed prior to the upgrade action.  ****

Aldo


On 10/24/24 19:46, Frank Weißer wrote:
> Hello Daniel,
>
> # man apt-get
>
> (german translation) doesn't tell anything else. apt-get upgrade 
> upgrades ALL installed packages.
>
> Kind regards
>
> Frank
>
> Daniel Roberts:
>> Hello,
>>
>> I've run into this a few times over the years and it can be a 
>> headache to resolve.
>>
>> Passing a package name to "apt-get update" results in the 
>> response "E: The update command takes no arguments". However, passing 
>> a package name to "apt-get upgrade" results in the argument being 
>> ignored and all packages upgraded.
>>
>> Is there some reason that this is the case? Is it a bug that has 
>> always existed and never fixed?
>>
>> Dan
>

[toc] | [prev] | [next] | [standalone]


#274003 — Re: Why does "apt-get upgrade {package}" upgrade all packages instead of error?

FromFelix Miata <mrmazda@stanis.net>
Date2024-10-24 20:50 +0200
SubjectRe: Why does "apt-get upgrade {package}" upgrade all packages instead of error?
Message-ID<JBb4d-3XsT-3@gated-at.bofh.it>
In reply to#273999
Daniel Roberts composed on 2024-10-24 13:19 (UTC-0400):

> I've run into this a few times over the years and it can be a headache to
> resolve.

> Passing a package name to "apt-get update" results in the response "E: The
> update command takes no arguments". However, passing a package name to
> "apt-get upgrade" results in the argument being ignored and all packages
> upgraded.

> Is there some reason that this is the case? Is it a bug that has
> always existed and never fixed?

It's not like dnf or zypper or urpmi. If you wish to upgrade a package, you
apt-get install it, to replace the existing version with the current version.
Upgrading is a distro process, not a package process, as is updating. Updating is
for the mirror information that upgrade and install processes need, not already
installed packages.
-- 
Evolution as taught in public schools is, like religion,
	based on faith, not based on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata

[toc] | [prev] | [next] | [standalone]


#274019 — Re: Why does "apt-get upgrade {package}" upgrade all packages instead of error?

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2024-10-25 01:30 +0200
SubjectRe: Why does "apt-get upgrade {package}" upgrade all packages instead of error?
Message-ID<JBfrb-40iF-1@gated-at.bofh.it>
In reply to#273999
On Thu 24 Oct 2024 at 13:19:13 (-0400), Daniel Roberts wrote:
> I've run into this a few times over the years and it can be a headache to
> resolve.
> 
> Passing a package name to "apt-get update" results in the response "E: The
> update command takes no arguments". However, passing a package name to
> "apt-get upgrade" results in the argument being ignored and all packages
> upgraded.
> 
> Is there some reason that this is the case? Is it a bug that has
> always existed and never fixed?

I can't provoke this bug, so we'd need to see your command line
and the output. AIUI the   … upgrade package   facility hasn't been
described in the man page until the extra sentence was added in
trixie (see Aldo's post), and even there it's absent from the
SYNOPSIS section.

So from a system still running bullseye, and lacking dhelp:

  # apt-get upgrade dhelp
  Reading package lists... Done
  Building dependency tree... Done
  Reading state information... Done
  Calculating upgrade... Done
  The following NEW packages will be installed:
    dhelp libappconfig-perl libcgi-fast-perl libcgi-pm-perl
    libclass-accessor-chained-perl libclass-accessor-perl
    libdata-page-perl libfcgi-bin libfcgi-perl libfcgi0ldbl
    libtemplate-perl swish++
  The following packages will be upgraded:
    ghostscript ghostscript-doc ghostscript-x libgs9 libgs9-common
    libheif1 libsepol1
  7 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
  Need to get 1312 kB/13.1 MB of archives.
  After this operation, 3533 kB of additional disk space will be used.
  Do you want to continue? [Y/n] 
  [ … … … ]
  Setting up ghostscript-x (9.53.3~dfsg-7+deb11u8) ...
  Setting up libdata-page-perl (2.03-1) ...
  Setting up libtemplate-perl (2.27-1+b3) ...
  Setting up dhelp (0.6.27) ...

  Creating config file /etc/apt/apt.conf.d/35dhelp with new version
  Building HTML tree... done.
  Reindexing documentation in the background
  Processing triggers for libc-bin (2.31-13+deb11u11) ...
  Processing triggers for man-db (2.9.4-2) ...
  Processing triggers for mailcap (3.69) ...
  Processing triggers for doc-base (0.11.1) ...
  Processing 1 changed doc-base file...
  Registering documents with dhelp...
  [master b5383c9] committing changes in /etc made by "apt-get upgrade dhelp"
   8 files changed, 209 insertions(+)
   create mode 100644 apache2/conf-available/dhelp.conf
   create mode 100644 apache2/conf.d/dhelp.conf
   create mode 100644 apt/apt.conf.d/35dhelp
   create mode 100755 cron.monthly/dhelp
   create mode 100755 cron.weekly/dhelp
   create mode 100644 dhelp.conf
   create mode 100644 lighttpd/conf-available/95-dhelp.conf
  Scanning processes...
  Scanning processor microcode...
  Scanning linux images...

  Running kernel seems to be up-to-date.

  The processor microcode seems to be up-to-date.

  No services need to be restarted.

  No containers need to be restarted.

  No user sessions are running outdated binaries.
  # 

Cheers,
David.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web