O'Reilly logo

Unix in a Nutshell, 4th Edition by Arnold Robbins

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

apt-get

Synopsis

apt-get [options] command [package ...]

A command-line tool for handling packages. Also serves as a backend to other APT tools such as dselect, synaptic, and aptitude (all described later in this section). As described earlier in this chapter, the following command can be run every day to keep your system updated:

apt-get update && apt-get -u dist-upgrade

Commands

autoclean

Like clean, but remove only package files that can no longer be downloaded. Set the configuration option APT::Clean-Installed to off to prevent installed packages from being erased.

build-dep

Install or remove packages to satisfy the build dependencies for a source package.

clean

Clear the local repository of retrieved package files. Useful for freeing up disk space.

check

Update the package cache and check for broken packages.

dist-upgrade

Like upgrade, but also handle dependencies intelligently. See the -f option for more information.

dselect-upgrade

Used with dselect. Track the changes made by dselect to the Status field of available packages and take actions necessary to realize that status.

install packages

Install one or more packages. Specify the package name, not the full filename. Other required packages are also retrieved and installed. With a hyphen appended to the package name, the package is removed if it is already installed. Select a version to install by appending an equals sign and the version.

remove packages

Remove one or more packages. Specify the package name, not the full ...

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