Difference between revisions of "Aptitude"

From Indie IT Wiki
imported>Indieit
 
(No difference)

Latest revision as of 14:00, 22 March 2016

Search For Specific Packages

Terminal:~$

sudo aptitude search ~ipackagename

sudo aptitude search ~igoogle

Search Results

Terminal:~$

sudo aptitude search package-name

This will return similar to the following:

Terminal:~$

p   aptitude:i386     - terminal-based package manager                                           
i A aptitude-common   - architecture independent files for the aptitude package manager

Each search result is listed on a separate line.

The first character of each line indicates the current state of the package: the most common states are:

  • p - meaning that no trace of the package exists on the system
  • c - meaning that the package was deleted but its configuration files remain on the system
  • i - meaning that the package is installed
  • v - meaning that the package is virtual

The second character indicates the stored action (if any; otherwise a blank space is displayed) to be performed on the package:

  • i - meaning that the package will be installed (the most common)
  • d - meaning that the package will be deleted
  • p - meaning that the package and its configuration files will be removed.

If the third character is A, the package was automatically installed.

Purging Config Files

If a search result displays a 'c' this shows that the package was deleted but its configuration files remain on the system, for example:

Terminal:~$

c   libvlc5           - multimedia player and streamer library

To purge the files:

 Terminal:~$

sudo aptitude purge libvlc5

Switches

aptitude update

Update the local cache of available packages (formerly apt-get update.

aptitude upgrade

Upgrade available packages (formerly apt-get upgrade).

aptitude dist-upgrade

Upgrade available packages even if it means removing stuff (formerly apt-get dist-upgrade).

aptitude install pkgname

Install package (formerly apt-get install).

aptitude remove pkgname

Uninstall package (formerly apt-get remove).

aptitude purge pkgname

Uninstall package and config files (formerly apt-get –purge remove).

aptitude search string

Search for a package with “string” in the name or description (formerly apt-cache search string).

aptitude show pkgname

Show detailed of a package (formerly apt-cache show pkgname).

aptitude clean

Delete downloaded package files (formerly apt-get clean).

aptitude autoclean

Delete only out-of-date package files but keep current ones (formerly apt-get autoclean).

aptitude hold pkgname

Fix a package at its current version and don’t upgrade it automatically (formerly an obscure echo-to-file command). unhold to remove the hold.