On Mon, Mar 11, 2024 at 11:32:24PM +0100, Miguel Angel Rojas wrote: > > I see. It looks like `apt upgrade <package>' behaves as `apt install > > <package>'. Which (to me) is unexpected behaviour, as the man page is > quite > >clear on its behaviour (man 8 apt-get): > > Well, clearly it shouldn’t. To begin with, “apt install” should mark a > package as manual installed while “apt upgrade” shouldn’t (my assumption). > And you’re right that “apt install” can remove a package if needed to > satisfy dependencies. > > On top of that, documentation clearly states that “apt upgrade” should not > remove any package, but it does when you specify an individual package to > upgrade. > > If this is not the expected behavior, maybe this is a bug (unless I am > missing something here).
I do not know what the bug here is, it could be one of these options: 1) apt-get/apt upgrade accepts packages to upgrade where the docs state it doesn't. The behaviour needs to change to not accept packages. 2) apt-get/apt upgrade accepts packages and removes packages to satisfy deps where the docs state it doesn't. The behaviour need to change to not remove any packages. There is a small edge case where you can say: `apt upgrade foo bar-'. Technically, it shouldn't remove packages, yet you want and instruct it to remove bar. FWIW, aptitude does not remove packages where you call `aptitude safe-upgrade foo'. It does remove packages when you call `aptitude full-upgrade foo'. It also removes bar when you run `aptitude safe-upgrade foo bar-'. I'll leave this for the maintainers to answer. Cheers, Wesley