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 731 times
0

Flux
- 505
2 Answers
2
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
- 23,667
0
You can do that with the command
apt show <packagename> 2>/dev/null | grep "APT-Manual-Installed"

mook765
- 15,925