Operating System : Ubuntu 16.04 (Xenial Xerus)
Checking the installed program in Ubuntu
Sometimes based on the command line utilities which can be executed in shell prompt we can list the already installed programs or utilities using apt command. Below is the command which can be used :
apt --installed list
The above command used to display all of the installed programs or utilities but we can customize it by using additional command as follow for an example :
apt --installed list | grep php7.0
The above command example is used to select whether utilities or programs containing string of “php7.0” is already installed or not. If the output of the above command’s result is empty it means that there aren’t any programs or utilities which are installed with the name containing “php7.0”. But as we can see with the following output there are already utilities or programs which contains name “php7.0” :
username@hostname:~# apt --installed list | grep php7.0 WARNING: apt does not have a stable CLI interface. Use with caution in scripts. libapache2-mod-php7.0/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0/xenial,xenial,now 7.0.8-3+deb.sury.org~xenial+1 all [installed] php7.0-cli/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed,automatic] php7.0-common/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed,automatic] php7.0-curl/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0-gd/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0-imap/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0-intl/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0-json/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed,automatic] php7.0-mbstring/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0-mcrypt/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0-mysql/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0-opcache/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed,automatic] php7.0-pspell/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0-readline/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed,automatic] php7.0-recode/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0-sqlite3/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0-tidy/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0-xml/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed,automatic] php7.0-xmlrpc/xenial,now 7.0.8-3+deb.sury.org~xenial+1 amd64 [installed] php7.0-xsl/xenial,xenial,now 7.0.8-3+deb.sury.org~xenial+1 all [installed] username@hostname:~#
It can be viewed in the image below :
Another example can also be shown as follows :
The above sample displays using the apt -installed list command to show whether there are any programs or utilities associated or have the name contains string of “php-mysql”. The above command is shown below :
apt -installed list | grep php-mysql
4 thoughts on “List Installed Program in Ubuntu Linux using apt command”