Custom Search

Ubuntu show installed packages tips

There are many methods used to show installed packages in Ubuntu server. However, you just need two methods to of showing installed packages. The first method is to print installed packages on the screen using the software package management utility, dpkg.



Here are some examples of Ubuntu show installed packages using dpkg command:



dpkg example 1 - List all installed pakages:




luzar@ubuntu:~$ dpkg -l | less


Below is the result of the above command. You can view next screen by pressing spacebar key or scroll down by line using arrow key.




Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-================================================================-==============
ii adduser 3.105ubuntu1 add and remove users and groups
ii apache2 2.2.8-1ubuntu0.3 Next generation, scalable, extendable web se
ii apache2-mpm-prefork 2.2.8-1ubuntu0.3 Traditional model for Apache HTTPD
ii apache2-utils 2.2.8-1ubuntu0.3 utility programs for webservers
ii apache2.2-common 2.2.8-1ubuntu0.3 Next generation, scalable, extendable web se
ii apparmor 2.1+1075-0ubuntu9.1 User-space parser utility for AppArmor
ii apparmor-utils 2.1+1075-0ubuntu9.1 Utilities for controlling AppArmor
ii apt 0.7.9ubuntu17.1 Advanced front-end for dpkg
ii apt-utils 0.7.9ubuntu17.1 APT utility programs
ii aptitude 0.4.9-2ubuntu5 terminal-based package manager
ii at 3.1.10ubuntu4 Delayed job execution and batch processing
ii base-files 4.0.1ubuntu5.8.04.2 Debian base system miscellaneous files
ii base-passwd 3.5.16 Debian base system master password and group
ii bash 3.2-0ubuntu18 The GNU Bourne Again SHell
ii bash-completion 20060301-3ubuntu3 programmable completion for the bash shell
ii belocs-locales-bin 2.4-2.2ubuntu7 tools for compiling locale data files
ii bind9 1:9.4.2-10 Internet Domain Name Server
ii bind9-doc 1:9.4.2.dfsg.P2-2 Documentation for BIND
ii bind9-host 1:9.4.2-10 Version of 'host' bundled with BIND 9.X
ii bsdmainutils 6.1.10ubuntu2 collection of more utilities from FreeBSD
ii bsdutils 1:2.13.1-5ubuntu2 Basic utilities from 4.4BSD-Lite
ii busybox-initramfs 1:1.1.3-5ubuntu12 Standalone shell setup for initramfs
:


dpkg example 2 - List installed pakages by name:




luzar@ubuntu:~$ dpkg -l | grep apache
ii apache2 2.2.8-1ubuntu0.3 Next generation, scalable, extendable web server
ii apache2-mpm-prefork 2.2.8-1ubuntu0.3 Traditional model for Apache HTTPD
ii apache2-utils 2.2.8-1ubuntu0.3 utility programs for webservers
ii apache2.2-common 2.2.8-1ubuntu0.3 Next generation, scalable, extendable web server
ii libapache2-mod-php5 5.2.4-2ubuntu5.3 server-side, HTML-embedded scripting language
luzar@ubuntu:~$


The other method is to search installed packages using aptitude package management utility. The aptitude can search for keywords contain in software package description. This is pretty helpful in a situation where you can't remember the exact package name.



Here is an example of aptitude command using search option:




luzar@ubuntu:~$ aptitude search \apache
i apache2 - Next generation, scalable, extendable web server
v apache2-dev -
p apache2-doc - documentation for apache2
v apache2-mpm -
p apache2-mpm-event - Event driven model for Apache HTTPD
p apache2-mpm-itk - multiuser MPM for Apache 2.2
p apache2-mpm-perchild - Transitional package - please remove
i apache2-mpm-prefork - Traditional model for Apache HTTPD
p apache2-mpm-worker - High speed threaded model for Apache HTTPD
p apache2-prefork-dev - development headers for apache2
p apache2-src - Apache source code
p apache2-threaded-dev - development headers for apache2
i apache2-utils - utility programs for webservers
i apache2.2-common - Next generation, scalable, extendable web server
p apachetop - Realtime Apache monitoring tool


The aptitude search command is going to print a long list of results. It's best if you use aptitude search pipe less option so you scroll by page or by line.




luzar@ubuntu:~$ aptitude search \apache | less


The aptitude show option can be used to show information about a package:




luzar@ubuntu:~$ aptitude show apache2-src
Package: apache2-src
State: not installed
Version: 2.2.8-1ubuntu0.3
Priority: extra
Section: devel
Maintainer: Ubuntu Core Developers
Uncompressed Size: 6349k
Description: Apache source code
This package includes the complete and patched source code for the Apache HTTPD.
It is useful for other packages to build-depend on in order to build
custom MPMs.
Homepage: http://httpd.apache.org/

No comments:

Post a Comment

Please keep comment relevant and strictly no spam will be tolerated. Thank you.