Downloading, installing, and removing packages

Changing package states as described in the previous section does not actually affect what is installed on your system. Thus, you can adjust the state of packages without affecting your system until you are happy with what you see; once you are, you can commit the changes by actually installing and removing packages.[8]

To commit your changes, use the ActionsInstall/remove packages (g) command. Selecting this command will display a preview screen describing the changes that will be performed. This screen is just a package list, and you can manipulate the packages (for instance, cancelling unwanted removals) in the same way that you could in the main list.

When you are done, use ViewsClose (q) to cancel the installation, or use ActionsInstall/remove packages (g) to proceed. aptitude will download any files that need to be downloaded, then prompt you to continue with the installation. When you select Continue, the installations and removals will commence.

Packages that are downloaded by aptitude are placed in a cache directory (typically /var/cache/apt/archives). Normally, they are just left in this directory ad infinitum. To delete all the files in this directory, use ActionsClean package cache; to delete only files which cannot be downloaded again (ie, obsolete packages), use ActionsClean obsolete files.



[8] This is sometimes referred to as an install run, even though you might be upgrading or removing packages in addition to installing them.