Ubuntu apt-get

 apt-get common commands


Advanced Packaging Tools (English: Advanced Packaging Tools, APT) is a package manager for Debian and its derivative distributions (eg: ubuntu).

apt-get Chinese parameter

usage:

apt-get [options] command apt-get [options] install|remove pkg1 [pkg2 ...]

apt-get [options] source pkg1 [pkg2 ...]

 
apt-get is a download Simple command line interface for installing packages. The most commonly used commands are update and install.

Commands:

update - get package list again

upgrade - make update

install - install new package

remove - remove package

autoremove - automatically remove all unused packages

purge - remove package and configuration file

source - download source code archive

build-dep - configure build dependencies for source packages

dist-upgrade - release upgrade

dselect-upgrade - update according to dselect selection

clean - clear downloaded archives

autoclean - clear old downloaded archives

check - verify that there are Broken dependencies

Options :

-h This help file.

-q output to log - no progress indication

-qq do not output information except errors

-d download only - do not install or extract archive

-s do not actually install. Simulate command execution

-y Assume yes to all queries, do not prompt

-f Try to fix broken system dependencies

-m If archive cannot be located, try to continue

-u Also display list of updated packages

-b Get source package and compile -V Display the detailed version number

-c=? Read this configuration file

-o=? Set custom configuration options, such as -o dir::cache=/tmp

Third, common examples of apt-get

apt-cache search packagename Search for packages
apt- cache show packagename Get information about the package, such as description, size, version, etc.
apt-get install packagename Install the package
apt-get install packagename --reinstall Reinstall the package
apt-get -f install Repair the installation "-f = --fix-missing ”
apt-get remove packagename Remove packages
apt-get remove packagename --purge Remove packages, including deleting configuration files, etc.
apt-get update Update sources
apt-get upgrade Update installed packages
apt-get dist-upgrade Upgrade the system
apt-get dselect-upgrade Use dselect to upgrade
apt-cache depends packagename Understand the use of dependencies
apt-cache rdepends packagename is to see which packages depend on the package
apt-get build-dep packagename Install the relevant compilation environment
apt-get source packagename Download the package source code
apt-get clean clean useless packages
apt-get autoclean clean useless packages
apt-get check check for broken dependencies

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326641276&siteId=291194637