<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>pacman</title><link rel="stylesheet" href="./docbook-xsl.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.72.0" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="id2433073"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>pacman — Arch Linux Package Manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><span class="strong"><strong>pacman</strong></span> &lt;<span class="emphasis"><em>operation</em></span>&gt; [<span class="emphasis"><em>options</em></span>] [<span class="emphasis"><em>packages</em></span>]</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id2518768"></a><h2>DESCRIPTION</h2><p><span class="strong"><strong>pacman</strong></span>  is  a package management utility that tracks installed packages
on a Linux system. It  features  dependency  support,  package  groups,
install and uninstall hooks, and the ability to sync your local machine
with a remote ftp server  to  automatically  upgrade  packages.  <span class="strong"><strong>pacman</strong></span>
packages are a zipped tar format.</p><p>Since version 3.0.0, <span class="strong"><strong>pacman</strong></span> has been the frontend to <span class="strong"><strong>libalpm</strong></span>, the "Arch
Linux Package Management"  library.  This  library  allows  alternative
front ends to be written (for instance, a GUI front end).</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id2497372"></a><h2>OPERATIONS</h2><div class="variablelist"><dl><dt><span class="term">
-A, --add (deprecated)
</span></dt><dd>
        Add  a  package  to the system. Either a URL or file path can be
        specified. The package will be uncompressed into  the  installa-
        tion root and the database will be updated. The package will not
        be installed if another  version  is  already  installed.  NOTE:
        please use <span class="strong"><strong>--upgrade</strong></span> in place of this option.
</dd><dt><span class="term">
-F, --freshen
</span></dt><dd>
        This  is  like  <span class="strong"><strong>--upgrade</strong></span>  except  it will only upgrade packages
        already installed on the system.
</dd><dt><span class="term">
-Q, --query
</span></dt><dd>
        Query the package database. This operation allows  you  to  view
        installed  packages and their files, as well as meta-information
        about  individual  packages  (dependencies,  conflicts,  install
        date, build date, size). This can be run against the local pack-
        age database or can be used on individual .tar.gz packages.  See
        <span class="strong"><strong>QUERY OPTIONS</strong></span> below.
</dd><dt><span class="term">
-R, --remove
</span></dt><dd>
        Remove  a package from the system. Files belonging to the speci-
        fied package will be deleted, and the database will be  updated.
        Most configuration files will be saved with a <span class="emphasis"><em>.pacsave</em></span> extension
        unless the <span class="strong"><strong>--nosave</strong></span> option is used. See <span class="strong"><strong>REMOVE OPTIONS</strong></span> below.
</dd><dt><span class="term">
-S, --sync
</span></dt><dd>
        Synchronize packages. Packages are installed directly  from  the
        ftp  servers,  including  all  dependencies  required to run the
        packages. For example, <span class="strong"><strong>pacman -S qt</strong></span> will download and install qt
        and  all the packages it depends on. You can also use <span class="strong"><strong>pacman -Su</strong></span>
        to upgrade all packages that are out of date. See  <span class="strong"><strong>SYNC  OPTIONS</strong></span>
        below.
</dd><dt><span class="term">
-U, --upgrade
</span></dt><dd>
        Upgrade or add a package to the system. Either a URL or file path can  be  specified.  This  is  a
        "remove-then-add"  process.  See <span class="strong"><strong>HANDLING CONFIG FILES</strong></span> for an explanation on how pacman takes care
        of config files.
</dd><dt><span class="term">
-V, --version
</span></dt><dd>
        Display version and exit.
</dd><dt><span class="term">
-h, --help
</span></dt><dd>
        Display syntax for the given operation. If no operation was supplied then the  general  syntax  is
        shown.
</dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id2487451"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">
--ask number
</span></dt><dd>
        Pre-specify  answers  to  questions. It is doubtful whether this
        option even works, so I would not recommend using it. TODO: doc-
        ument  this  more,  as  I  have no idea how it works or when you
        would use it, or if we should just dump it.
</dd><dt><span class="term">
-b, --dbpath <span class="emphasis"><em>path</em></span>
</span></dt><dd>
        Specify   an   alternative   database   location   (default   is
        "/var/lib/pacman/").  This  should  not  be used unless you know
        what you are doing.
</dd><dt><span class="term">
-d, --nodeps
</span></dt><dd>
        Skips all dependency checks. Normally, pacman will always  check
        a  package's  dependency  fields to ensure that all dependencies
        are installed and there are no package conflicts in the  system.
</dd><dt><span class="term">
-f, --force
</span></dt><dd>
        Bypass  file conflict checks and overwrite conflicting files. If
        the package that is about to be installed  contains  files  that
        are already installed, this option will cause all those files to
        be overwritten.  This option should be used with  care,  ideally
        not at all.
</dd><dt><span class="term">
-r, --root <span class="emphasis"><em>path</em></span>
</span></dt><dd>
        Specify  an alternative installation root (default is "/"). This
        should not be used as a way to install software into  /usr/local
        instead  of  /usr.  This option is used if you want to install a
        package on a temporary mounted partition  which  is  "owned"  by
        another  system. By using this option you not only specify where
        the software should be installed, but  you  also  specify  which
        package database and cache location to use.
</dd><dt><span class="term">
-v, --verbose
</span></dt><dd>
        Output more status messages, such as the Root and DBPath.
</dd><dt><span class="term">
--cachedir <span class="emphasis"><em>dir</em></span>
</span></dt><dd>
        Specify  an  alternative  package  cache  location  (default  is
        "/var/cache/pacman/pkg/"). This should not be  used  unless  you
        know what you are doing.
</dd><dt><span class="term">
--config <span class="emphasis"><em>filepath</em></span>
</span></dt><dd>
        Specify an alternate configuration file.
</dd><dt><span class="term">
--noconfirm
</span></dt><dd>
        Bypass  any  and  all  "Are you sure?" messages. It's not a good
        idea to do this unless you want to run pacman from a script.
</dd><dt><span class="term">
--noprogressbar
</span></dt><dd>
        Do not show a progress bar when downloading files. This  can  be
        useful for scripts that call pacman and capture the output.
</dd><dt><span class="term">
--noscriptlet
</span></dt><dd>
        Display all packages that are members of a named group.  If  not
        name is specified, list all grouped packages.
</dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id2487683"></a><h2>QUERY OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">
-c, --changelog
</span></dt><dd>
        View the ChangeLog of a package. Not every package will provide one but it will be shown if avail-
        able.
</dd><dt><span class="term">
-e, --orphans
</span></dt><dd>
        List all packages that were pulled in by a previously installed package but no longer required  by
        any installed package.
</dd><dt><span class="term">
-g, --groups
</span></dt><dd>
        Display all packages that are members of a named group. If not name is specified, list all grouped
        packages.
</dd><dt><span class="term">
-i, --info
</span></dt><dd>
        Display  information  on  a  given package. The <span class="strong"><strong>-p</strong></span> option can be
        used if querying a package file instead of the local database.
</dd><dt><span class="term">
-l, --list
</span></dt><dd>
        List all files owned by a given package. Multiple  packages  can
        be specified on the command line.
</dd><dt><span class="term">
-m, --foreign
</span></dt><dd>
        List  all  packages that were not found in the sync database(s).
        Typically these are packages that were downloaded  manually  and
        installed with <span class="strong"><strong>--upgrade</strong></span>.
</dd><dt><span class="term">
-o, --owns <span class="emphasis"><em>file</em></span>
</span></dt><dd>
        Search for the package that owns <span class="emphasis"><em>file</em></span>.
</dd><dt><span class="term">
-p, --file
</span></dt><dd>
        Signifies  that  the  package  supplied on the command line is a
        file and not an entry in the database. The file will  be  decom-
        pressed  and  queried. This is useful in combination with <span class="strong"><strong>--info</strong></span>
        and <span class="strong"><strong>--list</strong></span>.
</dd><dt><span class="term">
-s, --search <span class="emphasis"><em>regexp</em></span>
</span></dt><dd>
        This will search each locally-installed  package  for  names  or
        descriptions that matche <span class="emphasis"><em>regexp</em></span>.
</dd><dt><span class="term">
-u, --upgrades
</span></dt><dd>
        Lists  all  packages  that  are out of date on the local system.
        This option works best if the sync database is  refreshed  using
        <span class="strong"><strong>-Sy</strong></span>.
</dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id2488380"></a><h2>REMOVE OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">
-c, --cascade
</span></dt><dd>
        Remove  all target packages, as well as all packages that depend
        on one or more target packages. This operation is recursive.
</dd><dt><span class="term">
-k, --keep
</span></dt><dd>
        Removes the database entry only. Leaves all files in place.
</dd><dt><span class="term">
-n, --nosave
</span></dt><dd>
        Instructs pacman to ignore file backup designations.   Normally,
        when  a  file is removed from the system the database is checked
        to see if the file should be renamed with a .pacsave  extension.
</dd><dt><span class="term">
-s, --recursive
</span></dt><dd>
        Remove  each  target specified including all dependencies, provided that (A) they are not required
        by other packages; and (B) they were not explicitly installed by the user.  This option is  analo-
        gous to a backwards <span class="strong"><strong>--sync</strong></span> operation.
</dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id2488469"></a><h2>SYNC OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">
-c, --clean
</span></dt><dd>
        Remove old packages from the cache to free up disk space. When pacman downloads packages, it saves
        them in /var/cache/pacman/pkg. Use one <span class="strong"><strong>--clean</strong></span> switch to remove old packages; use  two  to  remove
        all packages from the cache.
</dd><dt><span class="term">
-e, --dependsonly
</span></dt><dd>
        Install  all dependencies of a package, but not the specified package itself.  This is pretty use-
        less and we're not sure why it even exists.
</dd><dt><span class="term">
-g, --groups
</span></dt><dd>
        Display  all the members for each package group specified. If no
        group names are provided, all groups will be  listed;  pass  the
        flag twice to view all groups and their members.
</dd><dt><span class="term">
-i, --info
</span></dt><dd>
        Display  dependency  and  other information for a given package.
        This will search through all repositories for a  matching  pack-
        age.
</dd><dt><span class="term">
-l, --list
</span></dt><dd>
        List all packages in the specified repositories. Multiple repos-
        itories can be specified on the command line.
</dd><dt><span class="term">
-p, --print-uris
</span></dt><dd>
        Print out URIs for each package that will be installed,  includ-
        ing  any dependencies yet to be installed. These can be piped to
        a file and downloaded at a later  time,  using  a  program  like
        wget.
</dd><dt><span class="term">
-s, --search <span class="emphasis"><em>regexp</em></span>
</span></dt><dd>
        This will search each package in the sync databases for names or
        descriptions that match <span class="emphasis"><em>regexp</em></span>.
</dd><dt><span class="term">
-u, --sysupgrade
</span></dt><dd>
        Upgrades all packages that are  out  of  date.  Each  currently-
        installed package will be examined and upgraded if a newer pack-
        age exists. A report of all packages to  upgrade  will  be  pre-
        sented and the operation will not proceed without user confirma-
        tion. Dependencies are automatically resolved at this level  and
        will be installed/upgraded if necessary.
</dd><dt><span class="term">
-w, --downloadonly
</span></dt><dd>
        Retrieve   all   packages   from   the   server,   but   do  not
        install/upgrade anything.
</dd><dt><span class="term">
-y, --refresh
</span></dt><dd>
        Download a fresh copy  of  the  master  package  list  from  the
        server(s)  defined in <span class="strong"><strong>pacman.conf</strong></span>. This should typically be used
        each time you use <span class="strong"><strong>--sysupgrade</strong></span> or <span class="strong"><strong>-u</strong></span>. Passing two  <span class="strong"><strong>--refresh</strong></span>  or
        <span class="strong"><strong>-y</strong></span>  flags will force a refresh of all package lists even if they
        are thought to be up to date.
</dd><dt><span class="term">
--ignore <span class="emphasis"><em>package</em></span>
</span></dt><dd>
        Directs pacman to ignore upgrades of <span class="emphasis"><em>package</em></span> even  if  there  is
        one available.
</dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id2488741"></a><h2>HANDLING CONFIG FILES</h2><p>pacman  uses  the  same  logic as rpm to determine action against files
that are designated to be backed up. During an upgrade,  3  md5  hashes</p><div class="variablelist"><dl><dt><span class="term">
original=X, current=Y, new=X
</span></dt><dd>
        Both package versions contain the exact same file, but  the  one
        on  the  filesystem has been modified. Leave the current file in
        place.
</dd><dt><span class="term">
original=X, current=Y, new=Y
</span></dt><dd>
        The new file is identical to the current file. Install  the  new
        file.
</dd><dt><span class="term">
original=X, current=Y, new=Z
</span></dt><dd>
        All  three  files  are different, so install the new file with a
        .pacnew extension and warn the user. The user must then manually
        merge any necessary changes into the original file.
</dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id2501470"></a><h2>CONFIGURATION</h2><p>See  <span class="strong"><strong>pacman.conf</strong></span>(5)  for  more  details on configuring <span class="strong"><strong>pacman</strong></span> using the
<span class="strong"><strong>pacman.conf</strong></span> file.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id2501498"></a><h2>BUGS</h2><p>Bugs? You must be kidding, there are no bugs in this software.  But  if
we happen to be wrong, send us an email with as much detail as possible
to &lt;pacman-dev@archlinux.org&gt;.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id2501514"></a><h2>SEE ALSO</h2><p><span class="strong"><strong>pacman.conf</strong></span>(5), <span class="strong"><strong>makepkg</strong></span>(8), <span class="strong"><strong>libalpm</strong></span>(3)</p><p>See the Arch Linux website at &lt;http://www.archlinux.org&gt; for more  cur-
rent information on the distribution and the <span class="strong"><strong>pacman</strong></span> family of tools.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id2501553"></a><h2>AUTHORS</h2><pre class="literallayout">Judd Vinet &lt;jvinet@zeroflux.org&gt;
Aurelien Foret &lt;aurelien@archlinux.org&gt;
Aaron Griffin &lt;aaron@archlinux.org&gt;
Dan McGee &lt;dan@archlinux.org&gt;</pre><p>See the <span class="emphasis"><em>AUTHORS</em></span> file for additional contributors.</p></div></div></body></html>
