Q. I've Debian 64 bit etch server installed. This box is managed via ssh or serial console only. There is no GUI installed. How do I search for packages using apt-get under Debian or Ubuntu Linux?
A. You can easily search for any packages using any one of the following tool.
a] apt-cache command : apt-cache performs a variety of operations on APT’s package cache. apt-cache does not manipulate the state of the system but does provide operations to search and generate interesting output from the package metadata.
b] aptitude command : aptitude is a text-based interface to the Debian GNU/Linux package system. It allows the user to view the list of packages and to perform package management tasks such as installing, upgrading, and removing packages. Actions may be performed from a visual interface or from the command-line.
apt-cache to search Debian / Ubuntu Linux Packages
Type the following command:
$ apt-cache search {package-name}
$ apt-cache search apache
$ apt-cache search 'web server'
Sample output:
aegis-web - aegis web based user interface analog - analyzes logfiles from web servers aolserver4 - AOL Web Server 4 (Program) aolserver4-dev - AOL Web Server 4 (Development Tools) aolserver4-doc - AOL Web Server 4 (Documentation) aolserver4-nsldap - AOLServer 4 module for LDAP apache2 - Next generation, scalable, extendable web server apache2-mpm-prefork - Traditional model for Apache HTTPD 2.1 apache2.2-common - Next generation, scalable, extendable web server araneida - A programmable web server written and extended in Lisp aria - Tool to download files from the Internet via HTTP or FTP awffull - web server log analysis program ... ....
aptitude to search new Debian / Ubuntu Linux Packages
You can search for new packages to install using Apt - the package manager. Using the search feature will output any packages that match the search criteria.
aptitude search {package-name}
aptitude search apache
aptitude search webserver
aptitude can also searches for packages matching one of the patterns supplied on the command line. All packages which match any of the given patterns will be displayed; for instance, following will list all new packages and all packages whose name contains edit:
aptitude search '~N' edit
See Debian Linux apt-get package management cheat sheet for further information.
Suggested readings:
- aptitude and apt-cache man pages
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- My 10 UNIX Command Line Mistakes
- Linux: 20 Iptables Examples For New SysAdmins

- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Facebook it - Tweet it - Print it -


{ 2 comments… read them below or add one }
You’ll want to run
apt-get update
apt-get upgrade
frequently to keep the system up to date.
thanks for the info.. exactly what i was searching for