dpkg

dpkg是debian最早提出的一个软件包管理工具,因为早期并没有考虑到当下软件包之间这么复杂的依赖关系,所以并不能自动解决软件包的依赖问题,这个命令多用于安装本地的.deb软件包,也可以进行软件包的维护
$sudo dpkg [-isLrP] [软件包或软件名]
-i package安装一个软件包
-s name查看软件包信息
-L name查看软件包的安装路径
-r name卸载软件,保留配置文件
-P name卸载软件,同时删除配置文件

例子

$sudo dpkg -i rxvt_1%3a2.6.4-14_i386.deb 
Selecting previously unselected package rxvt.
(Reading database ... 193732 files and directories currently installed.)
Unpacking rxvt (from rxvt_1%3a2.6.4-14_i386.deb) ...
Setting up rxvt (1:2.6.4-14) ...
update-alternatives: using /usr/bin/rxvt-xterm to provide /usr/bin/rxvt (rxvt) in auto mode.
update-alternatives: error: no alternatives for rclock.
Processing triggers for man-db ...
$sudo dpkg -s rxvt
Package: rxvt
Status: install ok installed
Priority: optional
Section: x11
Installed-Size: 536
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Architecture: i386
Version: 1:2.6.4-14
Provides: x-terminal-emulator
Depends: libc6 (>= 2.4), libx11-6, libxpm4
Conffiles:
 /etc/menu-methods/rxvt b0dfbc8f0b846ed1d5021cbdcc3b872a
Description: VT102 terminal emulator for the X Window System
 Rxvt is an 8-bit clean, color xterm replacement that uses significantly
 less memory than a conventional xterm, mostly since it doesn't support
 toolkit configurability or Tek graphics, but also since features can
 be removed at compile-time to reflect your needs.
 .
 The distribution also includes rclock, the smaller/better xclock
 replacement with appointment scheduling and xbiff functionality.
Original-Maintainer: Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>
$sudo dpkg -L rxvt
/.
/usr
/usr/bin
/usr/bin/rxvt-xterm
/usr/bin/rxvt-xpm
/usr/bin/rclock
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/rclock.1.gz
/usr/share/man/man1/rxvt-xterm.1.gz
/usr/share/doc
/usr/share/doc/rxvt
/usr/share/doc/rxvt/examples
/usr/share/doc/rxvt/examples/example.menu
/usr/share/doc/rxvt/examples/jedmenu.sl
/usr/share/doc/rxvt/examples/menu
/usr/share/doc/rxvt/examples/rxvt.menu
/usr/share/doc/rxvt/examples/terminal.menu
/usr/share/doc/rxvt/html
/usr/share/doc/rxvt/html/rxvt.html
/usr/share/doc/rxvt/html/rxvtRef-frame.html
/usr/share/doc/rxvt/html/rxvtRef-toc.html
/usr/share/doc/rxvt/html/rxvtRef.html
/usr/share/doc/rxvt/BUGS
/usr/share/doc/rxvt/README.xvt.gz
/usr/share/doc/rxvt/README.menu
/usr/share/doc/rxvt/xterm.seq.gz
/usr/share/doc/rxvt/FAQ.Debian.gz
/usr/share/doc/rxvt/changelog.Debian.gz
/usr/share/doc/rxvt/README.Debian
/usr/share/doc/rxvt/copyright
/usr/share/doc/rxvt/changelog.gz
/usr/share/doc/rxvt/FAQ.gz
/usr/share/doc/rxvt/README.greek.gz
/usr/share/doc/rxvt/rxvtRef.txt.gz
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/rxvt
/usr/share/menu
/usr/share/menu/rxvt
/etc
/etc/menu-methods
/etc/menu-methods/rxvt
/usr/share/man/man1/rxvt-xpm.1.gz
$sudo dpkg -r rxvt
(Reading database ... 193765 files and directories currently installed.)
Removing rxvt ...
update-alternatives: using /usr/bin/rxvt-xpm to provide /usr/bin/rxvt (rxvt) in auto mode.
Processing triggers for man-db ...
$sudo dpkg -s rxvt
Package: rxvt
Status: deinstall ok config-files
Priority: optional
Section: x11
Installed-Size: 536
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Architecture: i386
Version: 1:2.6.4-14
Config-Version: 1:2.6.4-14
Provides: x-terminal-emulator
Depends: libc6 (>= 2.4), libx11-6, libxpm4
Conffiles:
 /etc/menu-methods/rxvt b0dfbc8f0b846ed1d5021cbdcc3b872a
Description: VT102 terminal emulator for the X Window System
 Rxvt is an 8-bit clean, color xterm replacement that uses significantly
 less memory than a conventional xterm, mostly since it doesn't support
 toolkit configurability or Tek graphics, but also since features can
 be removed at compile-time to reflect your needs.
 .
 The distribution also includes rclock, the smaller/better xclock
 replacement with appointment scheduling and xbiff functionality.
Original-Maintainer: Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>
$sudo dpkg -P rxvt
(Reading database ... 193733 files and directories currently installed.)
Removing rxvt ...
Purging configuration files for rxvt ...
$sudo dpkg -s rxvt
Package `rxvt' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值