You are on page 1of 7

Packages Management System Arch and Debian Base Distro

Action
Install a package(s) by name
Remove a package(s) by
name
Search for package(s) by
searching the expression in
name, description, short
description. What exact
fields are being searched by
default varies in each tool.
Mostly options bring tools
on par.
Upgrade Packages - Install
packages which have an
older version already
installed
Upgrade Packages - Another
form of the update
command, which can
perform more complex
updates -- like distribution
upgrades. When the usual
update command will omit
package updates, which
include changes in
dependencies, this
command can perform
those updates.
Reinstall given Package Will reinstall the given
package without
dependency hassle.

Arch

Debian/Ubuntu

pacman -S

apt-get install

pacman -Rc

apt-get remove

pacman -Ss

apt-cache search

pacman -Syu

apt-get upgrade

pacman -Syu

apt-get dist-upgrade

pacman -S

apt-get install --reinstall

Installs local package file,


e.g. app.rpm and uses the
installation sources to
resolve dependencies
Updates package(s) with
local packages and uses the
installation sources to
resolve dependencies
Use some magic to fix
broken dependencies in a
system
Only downloads the given
package(s) without
unpacking or installing them
Remove dependencies that
are no longer needed,
because e.g. the package
which needed the
dependencies was removed.
Downloads the
corresponding source
package(s) to the given
package name(s)
Install/Remove packages to
satisfy build-dependencies.
Uses information in the
source package.
Add a package lock rule to
keep its current state from
being changed
Delete a package lock rule
Show a listing of all lock
rules
Mark a package previously
installed as a dependency
as explicitly required.

pacman -U

dpkg -i && apt-get install -f

pacman -U

n/a

pacman dep level - testdb, shared lib level - findbrokenpkgs or


lddd

apt-get --fix-broken / aptitude install

pacman -Sw

apt-get --download-only / aptitude download

pacman -Qdtq | pacman -Rs -

apt-get autoremove

Use ABS && makepkg -o

apt-get source / debcheckout

automatic

apt-get build-dep

${EDITOR} /etc/pacman.conf
modify IgnorePkg array

echo "$PKGNAME hold" | dpkg --set-selections

remove package from IgnorePkg line in /etc/pacman.conf

echo "$PKGNAME install" | dpkg --set-selections

cat /etc/pacman.conf

/etc/apt/preferences

pacman -D --asexplicit

aptitude unmarkauto

Install package(s) as
dependency / without
pacman -S --asdeps
marking as explicitly
required.
Get a dump of the whole
system information - Prints,
Saves or similar the current
state of the package
management system.
(see /var/lib/pacman/local)
Preferred output is text or
XML. (Note: Why either-or
here? No tool offers the
option to choose the output
format.)
Show all or most
information about a
package. The tools'
verbosity for the default
pacman -[S|Q]i
command vary. But with
options, the tools are on par
with each other.
Search for package(s) by
searching the expression in
name, description, short
description. What exact
pacman -Ss
fields are being searched by
default varies in each tool.
Mostly options bring tools
on par.
Lists packages which have
an update available. Note:
Some provide special
pacman -Qu
commands to limit the
output to certain installation
sources, others use options.

apt-cache stats

apt-cache show / apt-cache policy

apt-cache search

apt-get upgrade -> n

Display a list of all packages


in all installation sources
that are handled by the
packages management.
Some tools provide options
or additional commands to
limit the output to a specific
installation source.
Displays packages which
provide the given exp. aka
reverse provides. Mainly a
shortcut to search a specific
field. Other tools might
offer this functionality
through the search
command.
Display packages which
require X to be installed, aka
show reverse/
dependencies.
Display packages which
conflict with given
expression (often package).
Search can be used as well
to mimic this function.
List all packages which are
required for the given
package, aka show
dependencies.
List the files that the
package holds. Again, this
functionality can be
mimicked by other more
complex commands.
Search all packages to find
the one which holds the
specified file. auto-apt is
using this functionality.

pacman -Sl

apt-cache dumpavail apt-cache dump (Cache only) apt-cache


pkgnames

pkgfile <filename>

apt-file search <filename>

pacman -Sii

apt-cache rdepends / aptitude search ~Dpattern

(none)

aptitude search '~Cpattern'

pacman -[S|Q]i

apt-cache depends / apt-cache show

pacman -Ql $pkgname


pkgfile -l

dpkg-query -L $pkgname

pkgfile -s

apt-file search

Display all packages that the


specified packages
obsoletes.
Verify dependencies of the
complete system. Used if
installation process was
forcefully killed.
Generates a list of installed
packages
List packages that are
installed but are not
available in any installation
source (anymore).
List packages that were
recently added to one of the
installation sources, i.e.
which are new to it.
Show a log of actions taken
by the software
management.
Clean up all local caches.
Options might limit what is
actually cleaned. Autoclean
removes only unneeded,
obsolete information.
Add a local package to the
local package cache mostly
for debugging purposes.
Display the source package
to the given package
name(s)
Generates an output
suitable for processing with
dotty for the given
package(s).
Set the priority of the given
package to avoid upgrade,
force downgrade or to
overwrite any default

apt-cache show

testdb

apt-get check

pacman -Q

dpkg --get-selections

pacman -Qm

deborphan

(none)

aptitude search '~N' / aptitude forget-new

cat /var/log/pacman.log

cat /var/log/dpkg.log

pacman -Sc
pacman -Scc

apt-get clean / apt-get autoclean / aptitude clean

cp $pkgname /var/cache/pacman/pkg/

apt-cache add

apt-cache showsrc

apt-cache dotty
${EDITOR} /etc/pacman.conf
Modify HoldPkg and/or IgnorePkg arrays

/etc/apt/preferences, apt-cache policy

behavior. Can also be used


to prefer a package version
from a certain installation
source.
Remove a previously set
priority
Show a list of set priorities.
Ignores problems that
priorities may trigger.
Installation sources
management
Add an installation source
to the system. Some tools
provide additional
commands for certain
sources, others allow all
types of source URI for the
add command. Again
others, like apt and yum
force editing a sources list.
apt-cdrom is a special
command, which offers
special options design for
CDs/DVDs as source.
Refresh the information
about the specified
installation source(s) or all
installation sources.
Prints a list of all installation
sources including important
information like URI, alias
etc.
Download packages from a
different version of the
distribution than the one
installed.
Start a shell to enter
multiple commands in one
session

/etc/apt/preferences
apt-cache policy /etc/apt/preferences

${EDITOR} /etc/pacman.conf

${EDITOR} /etc/apt/sources.list

${EDITOR} /etc/pacman.conf

apt-cdrom add

pacman -Sy

apt-get update

cat /etc/pacman.d/mirrorlist

apt-get install -t release package/ apt-get install package/release


(deps not covered)
apt-config shell

Single package
All packages
List installed local packages
along with version
Display local package
information: Name, version,
description, etc.
Display remote package
information: Name, version,
description, etc.
Display files provided by
local package
Display files provided by a
remote package
Query the package which
provides FILE
Query a package supplied
on the command line rather
than an entry in the package
management database
Show the changelog of a
package
Search locally installed
package for names or
descriptions
Building Packages
Build a package
Check for possible
packaging issues
List the contents of a
package file
Extract a package
Query a package supplied
on the command line rather
than an entry in the package
management database

pacman -Qk[k] <package>


pacman -Qk[k]

debsums
debsums

pacman -Q

dpkg -l

pacman -Qi

dpkg -s

pacman -Si

apt-cache show / aptitude show

pacman -Ql

dpkg -L

pkgfile -l
pacman -Qo

dpkg -S/dlocate

pacman -Qp

dpkg -I

pacman -Qc

apt-get changelog

pacman -Qs

aptitude search '~i(~nexpr|~dexpr)'

makepkg -s

debuild
lintian

pacman -Qpl <file>

dpkg -L

tar -Jxvf

ar vx | tar -zxvf data.tar.gz

pacman -Qp

dpkg -I

You might also like