Dear Maintainer,
Running apt autoremove (or autopurge) resulted in some packages being
marked as manual afterwards, as shown by the output of apt-mark
showmanual.
Here is what happened in my particular situation.
I run the full GNOME desktop environment, obtained by installing the
"gnome" metapackage (not gnome-core). Some time later, I also
installed the "libreoffice" metapackage.
Afterwards, I noticed that the libreoffice metapackage also pulls in
libreoffice-base and libreoffice-draw, which I am not using. Since I
noticed that the gnome metapackage depends on the following packages:
- libreoffice-writer
- libreoffice-impress
- libreoffice-draw
- libreoffice-calc
which are the only parts of the LibreOffice suite I use regularly, I
decided to remove the libreoffice metapackage to tidy things up.
To do so, I marked it as "automatically installed" by running
"apt-mark auto libreoffice", then running "apt autoremove"
As expected, packages that were now no longer required, including the
libreoffice metapackage itself, were removed. To my surprise, the
following packages were later marked as manual according to apt-mark.
Here is the output of apt-mark showmanual | grep libreoffice right
after autoremoval:
libreoffice-calc
libreoffice-core
libreoffice-draw
libreoffice-gtk3
libreoffice-impress
libreoffice-writer
Before autoremoval, only libreoffice-gtk3 was listed, which was
expected since I did install that package manually.
Using autopurge instead of autoremove produces the same result.
Interestingly enough, if I just run "apt autoremove libreoffice"
directly instead of using apt-mark auto and _then_ running apt
atoremove, the issue does not occur: autoremove does not mark any
additional packages as manual.
To summarize, the following commands should be sufficient to reproduce
the issue:
apt install gnome && apt install libreoffice && apt-mark auto libreoffice && apt autoremove
After a brief interaction on the #debian channel on the IRC server
irc.debian.org, another user was able to reproduce the issue on
Trixie. This bug report specifically refers to Bookworm.
The main question is: is this the expected behavior?
If so, this should be described in detail in the official
documentation, preferably in the manpage. I couldn't find anything
about this anywhere in the documentation or the internet.
Of course, if this behavior is not expected, it is a genuine bug that
needs to be fixed.
Thank you for your time.