Re: Why does "apt-get upgrade {package}" upgrade all packages instead of error?
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.
Reply to: