• deb Debian software package format
  • dpkg low level tool
  • apt dpkg front-end
  • aptitude apt front-end
(install/update package)
$ apt-get install [pkg-name]
$ aptitude install [pkg-name]
$ dpkg -i [pkg-file.deb]

(update system)
$ apt-get update ; apt-get upgrade
$ aptitude update

(remove package)
$ dpkg -r [pkg-name]
$ apt-get remove [pkg-name]
$ apt-get autoremove [pkg-name] (also removes dependencies)
$ aptitude remove [pkg-name]

(purge=remove w/ configuration files)
$ dpkg -P [pkg-name]
$ apt-get --purge remove [pkg-name]
$ aptitude purge [pkg-name]

(search for package)
$ apt-cache search [pkg-name]
$ aptitude search [pkg-name]

(search by file)
$ apt-get file [file]
$ dpkg -S [file]

(list package files)
$ dpkg -L [pkg-name]

(show package info)
$ dpkg -l [pkg-name]
$ dpkg -s [pkg-name]
$ apt-cache show [pkg-name]
$ aptitude show [pkg-name]
$ apt-cache depends [pkg-name]

(list installed packages)
$ dpkg -l

(clean old/downloaded)
$ apt-get clean
$ aptitude clean
$ aptitude autoclean

(software repos)
$ cat /etc/apt/sources.list
$ apt-add-repository [url|ppa] or apt-add-repository [url|ppa] -r

(shows packages dependencies)
$ apt-cache depends [pkg-name]
(show packages that depending on)
$ apt-cache rdepends [pkg-name]

from cheat sheet for apt/rpm/xypp/urpmi/slap-get/pacman/smart,
cheat sheet for apt/yum/zypper and 25 Useful Basic Commands of APT-GET and APT-CACHE for Package Management


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s