[Bug 2100937] Re: apt install --mark-auto does not retain auto mark
Julian Andres Klode
2100937 at bugs.launchpad.net
Mon May 19 10:25:17 UTC 2025
The behavior displayed in the bug report matches the description in the
manual page quoted in comment 4, notably:
> mark all freshly installed packages as automatically installed
As such, the --mark-auto option does not affect packages which are
already installed, and they are subject to the usual rules:
If an upgrade is available, it is installed and the state is unchanged.
Otherwise, the state is set to manually installed.
Personally I'm not convinced that the state change is correct in any
case, but there's arguments for both sides. In particular I am worried
that users accidentally end up marking a lot of packages as manually
installed that they did not intend to.
Whether the mark-auto flag should apply to already installed arguments
is a topic that I have not formed an opinion on so far. Needless to say
changing an installed package from manual to auto because you pass it to
--mark-auto is not going to be the right call in most places, and we're
talking really about the issue entirely independent of mark-auto.
** Changed in: apt (Ubuntu)
Importance: Undecided => Wishlist
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/2100937
Title:
apt install --mark-auto does not retain auto mark
Status in apt package in Ubuntu:
New
Bug description:
e.g.
1) sudo apt install ppa-purge
2) sudo apt-mark auto ppa-purge
3) sudo apt install --mark-auto ppa-purge
Expected result:
ppa-purge is marked as auto
What happend:
ppa-purge is marked as manual
If line (2) is omitted, I think the result should be manual, even if
it is unintuitive. At least I need a way to retain the auto/manual
status when I install a package (without --reinstall) a version of
which is already installed no matter which auto/manual status the
previously installed package has. i.e. I want an option to retain the
auto/manual status of the old package when I use "apt install
pkg/target_release", because I want auto-removing work as expected
thereafter. It is debatable what should the status be, if there was no
package installed before.
BTW ppa-purge relies on "apt install" marking packages with the right
auto status, but it doesn't seem to work now. We need clear
documentation about when auto status is changed.
See also https://unix.stackexchange.com/q/786177/111181
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: apt 2.7.14build2
ProcVersionSignature: Ubuntu 6.8.0-54.56-generic 6.8.12
Uname: Linux 6.8.0-54-generic x86_64
ApportVersion: 2.28.1-0ubuntu3.3
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: XFCE
Date: Wed Mar 5 13:03:48 2025
InstallationDate: Installed on 2019-12-05 (1917 days ago)
InstallationMedia: Xubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
SourcePackage: apt
UpgradeStatus: Upgraded to noble on 2025-01-12 (52 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/2100937/+subscriptions
More information about the foundations-bugs
mailing list