Debian's Package management tool commands (Dpkg,apt-get)

Source: Internet
Author: User

This article is reproduced in: HTTP://BLOG.CHINAUNIX.NET/UID-20769502-ID-106056.HTML 1.DPKG Package management tool dpkg--info "package name"-- Lists package names after package unpacking. dpkg-l-Lists all packages in the current system. Can be used with the parameter less in Split-screen viewing. dpkg-l |grep-i "package name"--View the package associated with the package name in the system. Dpkg-s Query the details of the installed package. Dpkg-l the location of the installed packages in the query system. Dpkg-s Query the system for which package the file belongs to. dpkg-i Query the details of the Deb package, after a package has been downloaded to the local to see if it is not installed (see the chant). dpkg -I install the package manually (this command does not solve the dependencies of the package before the problem), if the installation of a software package is encountered when the problem of the dependencies, you can use the Apt-get-f install to solve the problem of trust. Dpkg-r Uninstall the package. Not a complete uninstall, Its configuration file also exists. Dpkg-p all uninstall (but still cannot resolve the problem of package dependencies) Dpkg-reconfigure reconfigure  2. APT Advanced package management tool (1) GTK graphics "synaptic", which is apt's front-end tool. (2) "aptitude", this is also APT's front-end tool. With APT management tools for package management, there are several ways to do the Source: (1) Take the installation disk as the source, the method is as follows: Apt-cdrom ident scan Disc Information Apt-cdrom add to add a disc source (2) This is also the most common method is to add the source to/etc/apt/source.list, and then update the column Apt-get UPDATEAPT management tools commonly used commands Apt-cache plus the use of different subcommands and parameters can be implemented to find, display software, Package information and package trust relationships. Apt-cache Stats displays statistics for all debain data sources used by the current system. Apt-cache Search + "package name", you can find related packages. Apt-cache Show + "package name", The details of the specified package can be displayed. Apt-cache depends + "package name", you can find dependencies for packages. Apt-get Upgrade update all packages in the system to the latest version Apt-get install package Apt-get-- Reindtall Install Reinstall package Apt-get Remove Uninstall Package Apt-get--purge Remove full Uninstall Package Apt-get clean clear useless package download the package to Apt-get before using the command/var/install Cache/apt/archives, and then install it. So we can use apt-get clean to clear the packages in the/var/cache/apt/archives directory. Source Package Installation Apt-cache SHOWSRC Find the file information to see the source package (before downloading) apt-get source download source package. Apt-get BUILD-DEP + "package name" builds the source package's compilation environment. Some basic usage of  3.apt-get and dpkg apt-get install PackageName #安装一个新软件包apt-get Remove packagename #卸载一个已安装的软件包 (keep config file) apt-get--purge remove PackageName # Uninstall an installed package (delete profile) dpkg--force-all--purge packagename #强制卸载, great risk! Apt-get upgrade #更新所有已安装的软件包apt-get dist-upgrade #将系统升级到新版本apt-get clean #清理所有软件缓存apt-get autoclean #清理旧版本的软件缓存apt-get Autoremove #删除系统不再使用的孤立软件apt-cdrom Add #增加一个光盘源auto-apt run./configure #编译时缺少h文件的自动处理apt-cache Search Regular Expression # Search the package list for a string dpkg-l regular expression #列出所有与模式相匹配的软件包dpkg-l |grep ^rc|awk ' {print $} ' | #xargs dpkg-p #清除所有已删除包的残馀配置文件dpkg-I,--install xxx.deb #安装 xxx.deb Package: dpkg--install stardict_3.0.1-1_i386.debdpkg-r, --remove,-P,--purge package...| -a|--pending

Debian Package Management tool commands (Dpkg,apt-get) detailed

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.