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.
Asked
Active
Viewed 1,680 times
1
Flux
- 565
- 1
- 5
- 20
2 Answers
4
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
popey
- 24,549
0
You can do that with the command
apt show <packagename> 2>/dev/null | grep "APT-Manual-Installed"
mook765
- 18,644