In this article, I will take you through 2 different ways that can be used to list all manually installed packages in Ubuntu/Debian. Many times you might want to know about all the packages which are automatically installed due to some dependency requirements from another package and also about the packages which you have manually installed. While there are multiple ways to find all those packages but here we will look into 2 simple ways that can be easily used to find out all the manually installed packages. We will see about automatically installed packages in upcoming articles.
2 Ways to List All Manually Installed Packages in Ubuntu/Debian
Method 1: Using apt or apt-get command
If you are using older Ubuntu/Debian version then you can use apt or apt-get command to check all the manually installed packages in Ubuntu/Debian. You need to run
apt list --manual-installed=true command to check all the manually installed packages. More about apt command.
rootuser to run all the below commands. You can use any user with
sudoaccess to run all these commands. For more information Please check Step by Step: How to Add User to Sudoers to provide
sudoaccess to the User.
root@debian:~# apt list --manual-installed=true Listing... Done adduser/stable,now 3.118 all [installed] apt-listchanges/stable,now 3.24 all [installed] apt-utils/stable,now 2.2.4 amd64 [installed] apt/stable,now 2.2.4 amd64 [installed] base-files/stable,now 11.1 amd64 [installed] base-passwd/stable,now 3.5.51 amd64 [installed] bash-completion/stable,now 1:2.11-2 all [installed] bash/stable,now 5.1-2+b3 amd64 [installed] bind9-dnsutils/stable,now 1:9.16.15-1 amd64 [installed] bind9-host/stable,now 1:9.16.15-1 amd64 [installed] bsdutils/stable,now 1:2.36.1-8 amd64 [installed] busybox/stable,now 1:1.30.1-6+b3 amd64 [installed] bzip2/stable,now 1.0.8-4 amd64 [installed] ca-certificates/stable,now 20210119 all [installed] console-setup/stable,now 1.205 all [installed] coreutils/stable,now 8.32-4+b1 amd64 [installed] cpio/stable,now 2.13+dfsg-4 amd64 [installed]
Method 2: Using apt-mark command
If you are using latest Ubuntu/Debian version then you can also use apt-mark command to check all the manually installed packages. You just need to run
apt-mark showmanual command to check that as you can see below.
root@debian:~# apt-mark showmanual adduser apt apt-listchanges apt-utils base-files base-passwd bash bash-completion bind9-dnsutils bind9-host bsdutils busybox bzip2 ca-certificates console-setup coreutils