Book Image

Troubleshooting Ubuntu Server

By : Skanda Bhargav
Book Image

Troubleshooting Ubuntu Server

By: Skanda Bhargav

Overview of this book

Table of Contents (16 chapters)
Troubleshooting Ubuntu Server
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Package management with aptitude


Type aptitude as shown here:

aptitude

The resulting screen is shown in the next screenshot. It is an interactive menu-driven frontend window for the APT to perform numerous tasks related to package management on your Ubuntu Server. You can install, remove, and upgrade packages with minimal operations from this window.

aptitude is best suited for a nongraphical environment, as it makes sure the command key operations are performed properly. Some of the experts believe that aptitude is a better suited package management tool compared to apt-get for dealing with packages that have dependencies. aptitude is the newer version and easier to use. Both aptitude and apt are abstractions over dpkg. Press F10 to enable the menu at the top. apt and aptitude use the same configuration, hence these are both interchangeable. aptitude has a menu-driven approach and supports all the apt-* commands.

aptitude presents the packages in categories as seen in the preceding screenshot. Use the navigation keys (Up and Down arrows) to jump to the categories. Each category's brief description is given in the second half of the window. The first category we see is Upgradable Packages, which shows the number of packages that are ready to be upgraded. The second line, New Packages, shows the number of packages that are new and can be installed on your Ubuntu Server. The next two are fairly simple to guess and understand. Virtual Packages gives an option to the administrators to organize the packages as they feel appropriate. Tasks are the packages that aren't categorized into any of these categories.

Some of the command keys to work with aptitude are as follows:

  • +: This adds a package to install

  • -: This removes a package

  • _: This purges a package

  • u: This updates a package

  • g: This performs the operation for which the packages are marked

  • ?: This opens a help box and shows all the command keys and their operations

  • Ctrl + T: This is same as F10, and it accesses the top menu

  • q: This enables you to go one screen back

  • Q: This quits aptitude

Take a look at the following screenshot:

When you highlight a package, as shown in this screenshot, aptitude displays a character on the first column. These are the descriptions of the state of the package in your local machine. The following are the letters you may encounter:

  • i: This means the package is installed

  • p: This means the package is purged

  • c: This means the configuration file is present but package is not installed

  • v: This means it is a virtual package

  • u: This means the package is not configured but the files are unpacked

  • B: This means the package is broken

  • C: This means the package is half-configured

  • H: This means the package is half-installed (may be due to removal failure)