List Installed Program in Ubuntu Linux using apt command

Posted on

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 amd64 [installed]
php7.0/xenial,xenial,now all [installed]
php7.0-cli/xenial,now amd64 [installed,automatic]
php7.0-common/xenial,now amd64 [installed,automatic]
php7.0-curl/xenial,now amd64 [installed]
php7.0-gd/xenial,now amd64 [installed]
php7.0-imap/xenial,now amd64 [installed]
php7.0-intl/xenial,now amd64 [installed]
php7.0-json/xenial,now amd64 [installed,automatic]
php7.0-mbstring/xenial,now amd64 [installed]
php7.0-mcrypt/xenial,now amd64 [installed]
php7.0-mysql/xenial,now amd64 [installed]
php7.0-opcache/xenial,now amd64 [installed,automatic]
php7.0-pspell/xenial,now amd64 [installed]
php7.0-readline/xenial,now amd64 [installed,automatic]
php7.0-recode/xenial,now amd64 [installed]
php7.0-sqlite3/xenial,now amd64 [installed]
php7.0-tidy/xenial,now amd64 [installed]
php7.0-xml/xenial,now amd64 [installed,automatic]
php7.0-xmlrpc/xenial,now amd64 [installed]
php7.0-xsl/xenial,xenial,now all [installed]

It can be viewed in the image below :

Displaying the usage command of ‘apt’ to display the installed program or utilities containing name of ‘php7.0’

Another example can also be shown as follows :

Displaying the usage of apt command viewing installed program or utilities containing character of ‘php-mysql’

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

Leave a Reply