apt-get Flashcards
apt-get
apt-get is the command-line tool for handling packages, and may be considered the user’s “back-end” to other tools using the APT library.
![](https://s3.amazonaws.com/brainscape-prod/system/cm/313/166/313/a_image_thumb.png?1591194453)
apt-get upgrade
apt-get update
apt-get dist-upgrade
update, Update is used to resyncronize the package index files from their sources. The index of available packages is at /etc/apt/sources.list.
upgrade, Upgrade is used to install the newest versions of all packages currently installed on the system.
dist-upgrade, Dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new package versions.
apt-get install
apt-get install –only-upgrade
install, Install is followed by one or more packages desired for installation or upgrading.
install –only-upgrade, Does not install new packages; when used with install it will only install upgrades for already installed packages.
apt-get remove
apt-get purge
remove, Remove is identical to install except that packages are removed instead of installed. Configuration files for the package will not be removed.
purge, Purge is identical to remove except that packages are removed and configuration files are purged.
apt-get clean
clean, Clean clears out the local repository of retrieved package files.
apt-get source
apt-get –download-only source
apt-get –compile source
source, Source causes apt-get to fetch source packages. It will find and download the newest available version of source package.
–download-only source, Source still fetches and downloads the source package, but doesn’t unpack the file.
–compile source, The compile option will compile the source package into a .deb using dpkg-buildpackage.
apt-get download
apt-get changelog
apt-get check
download, Download will download the given binary package into the current directory without installing it.
changelog, Changelog tries to download the changelog of a package and display it. By default it downloads the option that is installed.
check, Check is a diagnostic tool; it updates the package cache and checks for broken dependencies.
apt-get build-dep
apt-get autoclean
build-dep, Build-dep causes apt-get to install/remove packages in an attempt to satisfy the build dependencies for a source package.
autoclean, Like clean, autoclean clears out the local repository of retrieved package files. However, the difference is that it only removes packages that cannot be downloaded anymore.
apt-get -y
-y, –yes, –assume-yes, These options provide an automatic yes to prompts.