Score:0

How to know whether a package is automatically or manually installed

vn flag

Is there an apt-cache, dpkg, or apt command that can show whether a particular package is "automatic" or "manual"? dpkg -s <package> is able to show me whether or not a particular package is installed, but it does not say whether the package is automatically or manually installed.

Score:1
pl flag

You want the apt-mark command. Specifically apt-mark showauto and apt-mark showmanual.

For example:

alan@ziggy:~$ apt-mark showauto | head
amd64-microcode
apparmor
attr
bash-completion
bind9-dnsutils
bind9-host
bind9-libs
binfmt-support
binutils
binutils-common
alan@ziggy:~$ apt-mark showmanual | head
accountsservice
acl
acpid
adduser
adwaita-icon-theme
aha
aisleriot
alsa-base
alsa-topology-conf
alsa-ucm-conf
Score:0
cn flag

You can do that with the command

apt show <packagename> 2>/dev/null | grep "APT-Manual-Installed"
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.