Dpkg, apt difference

Source: Internet
Author: User
Dpkg, apt difference-Debian information of the Linux release-the following is a detailed description. Dpkg is used to install the. deb file, but does not solve the module dependency, and does not care about the software in the ubuntu software repository. It can be used to install local deb files.

Apt will solve and install module dependencies, and consult the software warehouse, but will not install local deb files. apt is a software management tool built on dpkg.

Sudo apt-get update Consults/etc/apt/sources. list
And updates the database of available
Packages. Be sure to run this command
Whenever sources. list is changed.
Apt-cache search Case-insensitive search of the package
Database for the keyword given.
Package names and descriptions are
Returned where that keyword is found.
Sudo apt-get install Download and install the given package
Name as found in the package database.
Starting with APT version 0.6, this
Command will automatically verify
Package authenticity for gpg keys it
Knows about (http://wiki.debian
. Org/SecureApt ).

Sudo apt-get-d install Download the package only, placing it
In/var/cache/apt/archives.
Apt-cache show Display information about the software
From the named package.
Sudo apt-get upgrade Check updates for all installed packages
And then prompt to download
And install them.
Sudo apt-get dist-upgrade Updates the entire system to a new
Release, even if it means removing
Packages. Note: This is not the preferred
Method for updating a system.
Sudo apt-get autoclean Can be run anytime to delete partially
Downloaded packages, or packages
No longer installed.
Sudo apt-get clean Removes all cached packages from
/Var/cache/apt/archives
Free up disk space.
Sudo apt-get -- purge remove Remove the named package and all
Its configuration files. Remove
-- Purge keyword to keep config
Files.
Sudo apt-get-f install Do a sanity check for broken packages.
This tries to fix any "unmet
Dependency "messages.
Apt-config-V Print version information of installed
APT utilities.
Sudo apt-key list List gpg keys that APT knows about.
Apt-cache stats Print statistics on all packages
Installed.
Apt-cache depends Print dependencies for a package
(Whether it's installed or not ).
Apt-cache pkgnames List all packages installed on
System.


Dpkg-c <. deb file> Lists files which are installed by
. Deb file given (. deb file must be
Path/filename ).
Dpkg? I <. deb file> Lists information about the. deb
Given file.
Dpkg? P Lists information about the package.
Dkpg? S Lists the packages where the given
File name is found. This can be a path,
Or just the name of a file.

Dpkg? L Lists installed packages. This will also
Take options for more specific info.
Dpkg-L Lists all the files which have been
Installed from package (package must
Have been previusly installed ).
Dpkg? S Lists the status of the given package.
Sudo dpkg? I <. deb file> INSTALLThe given. deb file.
Sudo dpkg? R Removes the given package from
System, but leaves files behind.
Sudo dpkg? P Removes package and config files
Given package.
Sudo dpkg-x <. deb file> Extracts the files contained in
. Deb file to a destination directory.
Note that this will reset permissions
On the target directory.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.