O'Reilly logo

Linux Pocket Guide, 2nd Edition by Daniel J. Barrett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

aptitude — stdin  stdout  - file  -- opt  --help  --version

Synopsis

aptitude [options] [packages]

aptitude is a package manager for the command line that manipulates Debian (.deb) packages. Some older Debian package managers, including Advanced Packaging Tool (the apt-get command suite) and dpkg, are also in wide use today. (In our table of commands, we’ll use dpkg to work with local files, since aptitude does not do this.) You’ll also encounter graphical package managers like synaptic and Ubuntu’s update-manager.

Action

yum command

Search for a package that meets your needs

aptitude search package_name

Check if a package is installed (examine the output for “State: not installed” or “State: installed”)

aptitude show package_name

Download a package but don’t install it

aptitude download package_name

Download and install a package

aptitude install package_name

Install a package file

dpkg -i package_file.deb

Learn about a package

aptitude show package_name

List the contents of a package

dpkg -L package_name

Discover which package an installed file belongs to

dpkg -S /path/to/file

Update an installed package

aptitude safe-upgrade package_name

Remove an installed package

aptitude remove package_name

List all packages installed on the system

aptitude search '~i' | less

Check for updates for all packages on the system

aptitude --simulate full-upgrade

Update all packages on the system

aptitude full-upgrade

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required