dpkg, APT, aptitude常用命令

Install

dpkg --install, -i [deb]
apt-get install [package]
aptitude install [package]

Remove

dpkg --remove, -r [package]
dpkg --purge, -P [package]
apt-get remove [package]
apt-get purge [package]
aptitude remove [package]
aptitude purge [package]

dpkg-query --list, -l [pattern] // installed
dpkg-query --search, -S [file] // installed
apt-cache search [pattern]
apt-file search [file]
aptitude search [pattern]

Show infomation

dpkg-query --status, -s [package]
dpkg-query --listfiles, -L [package]
dpkg-deb --info, -I [deb]
dpkg-deb --contents, -c [deb]
dpkg-deb --field, -f [deb]
apt-cache show [package]
apt-cache showpkg [package]
apt-cache depends [package]
apt-cache rdepends [package]
aptitude show [package]

Notice
apt-file should be installed and run apt-file update before used.

Use proxy

  • Temporary proxy
    • export http_proxy=http://yourproxyaddress:proxyport

Reference

  1. dpkg man page
  2. APT and Dpkg Quick Reference Sheet
  3. Package management with APT
  4. Debian package management
  5. Is aptitude still considered superior to apt-get?
posted @ 2015-03-18 01:21  n0p  阅读(311)  评论(0编辑  收藏  举报