Skip to content

Instantly share code, notes, and snippets.

@bashM0nk3y
Created September 5, 2018 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bashM0nk3y/e28b612f7afa9e56529ab76ab5e87a04 to your computer and use it in GitHub Desktop.
Save bashM0nk3y/e28b612f7afa9e56529ab76ab5e87a04 to your computer and use it in GitHub Desktop.
Cheat sheet for the pacman package mngr.
#######################################################################
############ Pacman Cheat Sheet #######################################
#######################################################################
usage: pacman <operation> [...]
operations:
pacman {-h --help}
pacman {-V --version}
pacman {-D --database} <options> <package(s)>
pacman {-F --files} [options] [package(s)]
pacman {-Q --query} [options] [package(s)]
pacman {-R --remove} [options] <package(s)>
pacman {-S --sync} [options] [package(s)]
pacman {-T --deptest} [options] [package(s)]
pacman {-U --upgrade} [options] <file(s)>
use 'pacman {-h --help}' with an operation for available options
############ Pacman -S ################################################
#######################################################################
usage: pacman {-S --sync} [options] [package(s)]
options:
-b, --dbpath <path> set an alternate database location
-c, --clean remove old packages from cache directory (-cc for all)
-d, --nodeps skip dependency version checks (-dd to skip all checks)
-g, --groups view all members of a package group
(-gg to view all groups and members)
-i, --info view package information (-ii for extended information)
-l, --list <repo> view a list of packages in a repo
-p, --print print the targets instead of performing the operation
-q, --quiet show less information for query and search
-s, --search <regex> search remote repositories for matching strings
-u, --sysupgrade upgrade installed packages (-uu enables downgrades)
-v, --verbose be verbose
-w, --downloadonly download packages but do not install/upgrade anything
-y, --refresh download fresh package databases from the server
(-yy to force a refresh even if up to date)
--arch <arch> set an alternate architecture
--asdeps install packages as non-explicitly installed
--asexplicit install packages as explicitly installed
--assume-installed <package=version>
add a virtual package to satisfy dependencies
--cachedir <dir> set an alternate package cache location
--color <when> colorize the output
--config <path> set an alternate configuration file
--confirm always ask for confirmation
--dbonly only modify database entries, not package files
--debug display debug messages
--disable-download-timeout
use relaxed timeouts for download
--gpgdir <path> set an alternate home directory for GnuPG
--hookdir <dir> set an alternate hook location
--ignore <pkg> ignore a package upgrade (can be used more than once)
--ignoregroup <grp>
ignore a group upgrade (can be used more than once)
--logfile <path> set an alternate log file
--needed do not reinstall up to date packages
--noconfirm do not ask for any confirmation
--noprogressbar do not show a progress bar when downloading files
--noscriptlet do not execute the install scriptlet if one exists
--overwrite <path>
overwrite conflicting files (can be used more than once)
--print-format <string>
specify how the targets should be printed
--sysroot operate on a mounted guest system (root-only)
############ Pacman -R ################################################
#######################################################################
usage: pacman {-R --remove} [options] <package(s)>
options:
-b, --dbpath <path> set an alternate database location
-c, --cascade remove packages and all packages that depend on them
-d, --nodeps skip dependency version checks (-dd to skip all checks)
-n, --nosave remove configuration files
-p, --print print the targets instead of performing the operation
-s, --recursive remove unnecessary dependencies
(-ss includes explicitly installed dependencies)
-u, --unneeded remove unneeded packages
-v, --verbose be verbose
--arch <arch> set an alternate architecture
--assume-installed <package=version>
add a virtual package to satisfy dependencies
--cachedir <dir> set an alternate package cache location
--color <when> colorize the output
--config <path> set an alternate configuration file
--confirm always ask for confirmation
--dbonly only modify database entries, not package files
--debug display debug messages
--disable-download-timeout
use relaxed timeouts for download
--gpgdir <path> set an alternate home directory for GnuPG
--hookdir <dir> set an alternate hook location
--logfile <path> set an alternate log file
--noconfirm do not ask for any confirmation
--noprogressbar do not show a progress bar when downloading files
--noscriptlet do not execute the install scriptlet if one exists
--print-format <string>
specify how the targets should be printed
--sysroot operate on a mounted guest system (root-only)
############ Pacman -U ################################################
#######################################################################
usage: pacman {-U --upgrade} [options] <file(s)>
options:
-b, --dbpath <path> set an alternate database location
-d, --nodeps skip dependency version checks (-dd to skip all checks)
-p, --print print the targets instead of performing the operation
-v, --verbose be verbose
--arch <arch> set an alternate architecture
--asdeps install packages as non-explicitly installed
--asexplicit install packages as explicitly installed
--assume-installed <package=version>
add a virtual package to satisfy dependencies
--cachedir <dir> set an alternate package cache location
--color <when> colorize the output
--config <path> set an alternate configuration file
--confirm always ask for confirmation
--dbonly only modify database entries, not package files
--debug display debug messages
--disable-download-timeout
use relaxed timeouts for download
--gpgdir <path> set an alternate home directory for GnuPG
--hookdir <dir> set an alternate hook location
--ignore <pkg> ignore a package upgrade (can be used more than once)
--ignoregroup <grp>
ignore a group upgrade (can be used more than once)
--logfile <path> set an alternate log file
--needed do not reinstall up to date packages
--noconfirm do not ask for any confirmation
--noprogressbar do not show a progress bar when downloading files
--noscriptlet do not execute the install scriptlet if one exists
--overwrite <path>
overwrite conflicting files (can be used more than once)
--print-format <string>
specify how the targets should be printed
--sysroot operate on a mounted guest system (root-only)
############ Pacman -Q ################################################
#######################################################################
usage: pacman {-Q --query} [options] [package(s)]
options:
-b, --dbpath <path> set an alternate database location
-c, --changelog view the changelog of a package
-d, --deps list packages installed as dependencies [filter]
-e, --explicit list packages explicitly installed [filter]
-g, --groups view all members of a package group
-i, --info view package information (-ii for backup files)
-k, --check check that package files exist (-kk for file properties)
-l, --list list the files owned by the queried package
-m, --foreign list installed packages not found in sync db(s) [filter]
-n, --native list installed packages only found in sync db(s) [filter]
-o, --owns <file> query the package that owns <file>
-p, --file <package> query a package file instead of the database
-q, --quiet show less information for query and search
-s, --search <regex> search locally-installed packages for matching strings
-t, --unrequired list packages not (optionally) required by any
package (-tt to ignore optdepends) [filter]
-u, --upgrades list outdated packages [filter]
-v, --verbose be verbose
--arch <arch> set an alternate architecture
--cachedir <dir> set an alternate package cache location
--color <when> colorize the output
--config <path> set an alternate configuration file
--confirm always ask for confirmation
--debug display debug messages
--disable-download-timeout
use relaxed timeouts for download
--gpgdir <path> set an alternate home directory for GnuPG
--hookdir <dir> set an alternate hook location
--logfile <path> set an alternate log file
--noconfirm do not ask for any confirmation
--sysroot operate on a mounted guest system (root-only)
############ Pacman -F ################################################
#######################################################################
-b, --dbpath <path> set an alternate database location
-l, --list list the files owned by the queried package
-o, --owns <file> query the package that owns <file>
-q, --quiet show less information for query and search
-s, --search <file> search package file names for matching strings
-v, --verbose be verbose
-x, --regex enable searching using regular expressions
-y, --refresh download fresh package databases from the server
(-yy to force a refresh even if up to date)
--arch <arch> set an alternate architecture
--cachedir <dir> set an alternate package cache location
--color <when> colorize the output
--config <path> set an alternate configuration file
--confirm always ask for confirmation
--debug display debug messages
--disable-download-timeout
use relaxed timeouts for download
--gpgdir <path> set an alternate home directory for GnuPG
--hookdir <dir> set an alternate hook location
--logfile <path> set an alternate log file
--machinereadable
produce machine-readable output
--noconfirm do not ask for any confirmation
--sysroot operate on a mounted guest system (root-only)
############ Pacman -D ################################################
#######################################################################
usage: pacman {-D --database} <options> <package(s)>
options:
-b, --dbpath <path> set an alternate database location
-k, --check test local database for validity (-kk for sync databases)
-q, --quiet suppress output of success messages
-v, --verbose be verbose
--arch <arch> set an alternate architecture
--asdeps mark packages as non-explicitly installed
--asexplicit mark packages as explicitly installed
--cachedir <dir> set an alternate package cache location
--color <when> colorize the output
--config <path> set an alternate configuration file
--confirm always ask for confirmation
--debug display debug messages
--disable-download-timeout
use relaxed timeouts for download
--gpgdir <path> set an alternate home directory for GnuPG
--hookdir <dir> set an alternate hook location
--logfile <path> set an alternate log file
--noconfirm do not ask for any confirmation
--sysroot operate on a mounted guest system (root-only)
######### Pacman -T ###################################################
#######################################################################
usage: pacman {-T --deptest} [options] [package(s)]
options:
-b, --dbpath <path> set an alternate database location
-v, --verbose be verbose
--arch <arch> set an alternate architecture
--cachedir <dir> set an alternate package cache location
--color <when> colorize the output
--config <path> set an alternate configuration file
--confirm always ask for confirmation
--debug display debug messages
--disable-download-timeout
use relaxed timeouts for download
--gpgdir <path> set an alternate home directory for GnuPG
--hookdir <dir> set an alternate hook location
--logfile <path> set an alternate log file
--noconfirm do not ask for any confirmation
--sysroot operate on a mounted guest system (root-only)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment