How do I see what packages are installed on Ubuntu Linux?
The procedure to list what packages are installed on Ubuntu:
- Open the terminal application or log in to the remote server using ssh (e.g. ssh user@sever-name)
- Run command apt list --installed to list all installed packages on Ubuntu
- To display a list of packages satisfying certain criteria such as show matching apache2 packages, run apt list apache2
- Want to get a list of all upgradeable packages? Try:
apt list --upgradeable
Let us see some examples about how to list installed packages on Ubuntu and Debian Linux operating systems.
apt list installed packages
Let us list all software packages on Ubuntu Linux available for us:
$ apt list
You might want to use the grep command/egrep command to filter out:
$ apt list | grep nginx
$ apt list | more
However, you may see message on screen that read as follows:
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
To avoid this message use the dpkg command as follows:
$ dpkg --list | grep nginx
$ dpkg --list | more
List all installed packages only
The apt command displays both installed and packages available to install. What if you want to list currently installed software only? Fear not, pass the option to the apt command:
$ apt list --installed
How to list or find out if a specific package installed or not
Run package policy as follows:
$ apt list -a pkgNameHere
Is sudo package installed?
$ apt list -a sudo
Is sudo package mariadb-server?
$ apt list -a mariadb-server
Ubuntu list installed packages
It is also possible to list installed packages matching given pattern. The syntax is:
dpkg -l pattern
dpkg --list pattern
apt list pattern
apt list --installed pattern
dpkg --list 'x*'