热门标签 | HotTags
当前位置:  开发笔记 > 运维 > 正文

dpkg,apt差别

dpkg,apt差别--Linux发行版技术-Debian信息,下面是详情阅读。
dpkg是用来安装.deb文件,但不会解决模块的依赖关系,且不会关心ubuntu的软件仓库内的软件,可以用于安装本地的deb文件

apt会解决和安装模块的依赖问题,并会咨询软件仓库, 但不会安装本地的deb文件, apt是建立在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. The
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 to
free up disk space.
sudo apt-get --purge remove Remove the named package and all
its configuration files. Remove the
--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 the
system.


dpkg -c <.deb file> Lists files which are installed by the
.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 previously installed).
dpkg ?s Lists the status of the given package.
sudo dpkg ?i <.deb file> Installs the given .deb file.
sudo dpkg ?r Removes the given package from the
system, but leaves files behind.
sudo dpkg ?P Removes package and config files of
given package.
sudo dpkg -x <.deb file> Extracts the files contained in the
.deb file to a destination directory.
Note that this will reset permissions
on the target directory.
推荐阅读
author-avatar
贾春雨-cherry
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有