Ubuntu software package management tool and ubuntu Software Package Tool
Ubuntu software package management tool dpkg, APT commands
Ubuntu software package management tool dpkg APT command Dpkg APT
Dpkg
Dpkg is a package management system developed by Debian and is a relatively underlying tool. Its most common front-end is APT.
Common commands
Dpkg-I debFileName-install a deb package dpkg-I debFileName-view the information of a package dpkg-r packageName-delete the package (retain the configuration file) dpkg-P packageName-Permanently delete the package (including the configuration file) dpkg-l [packageName]-view the installed package, it is often used with grep to use dpkg-L packageName-to view the package's files to download the source code of a tool, such as top
Dpkg-S $ (which top) or dpkg-S $ (whereis top)-view the package to which the file belongs
Procps:/usr/bin/top apt-get source-d procps-get the source code of this package. You need to unpack it yourself.
Dpkg-source-x foo_version-revision.dsc or
Apt-get source procps-get source code and unpack APT
As the front-end of dpkg In the Debian system, you can automatically download, configure, install software packages, and solve the package dependency.
The source address of APT software is in/etc/apt/sources. list.
You can also add more sources to the/etc/apt/sources. list. d directory.
Some parameters
-H-Help-q-output to log, no prompt-qq-No output, except for errors-d-not installed or decompress the archive file-s-not actually installed, run the command-y only. If yes, do not prompt-f. If the test fails, continue to execute-m. If a package archive cannot be found, still try to continue executing-u-display the update package list-B-obtain the source package and compile-V-show the detailed version number-c =? -Read the specified configuration-o =? -Set any specified configuration options, such as-o dir: cache =/tmp update/upgrade
Apt-get update-update software source index apt-get upgrade-upgrade all software packages, re-analyze dependencies and install related packages apt-get dselect-upgrade-according to dselect (a traditional front-end package management tool) select to upgrade the software package apt-get dist-upgrade the system and all software packages,
Use with cautionInstall/uninstall
Apt-get install pkg-install the software package apt-get build-dep pkg-install all dependencies on the package apt-get remove pkg-uninstall the software package apt-get purge pkg-uninstall the software package (including configuration files) apt-get remove -- purge pkg-this command is equivalent to the above command. You can thoroughly uninstall the software package (including configuration files) apt-get autoremove-to clear dependencies that have been installed, unneeded package cleaning/Maintenance
Apt-get clean-clear downloaded package apt-get autoclean-only clear outdated package apt-get check-check for incorrect dependency search/download
Apt-cache search pkg-search package apt-cache show pkg-show package information apt-cache showpkg pkg-show package information apt-cache depends pkg-show package dependent package apt-cache rdepends pkg-show which package the package depends on apt-cache stats-show statistics apt-get download pkg-download package apt-get source pkg-download source package and unpack apt-get source-d pkg only downloads the source code package eggs
Apt-get moo