1. downgrade(8)
  2. downgrade(8)

NAME

downgrade - downgrade arch linux packages

SYNOPSIS

downgrade OPTIONS PKG [PKG...] [-- PACMAN OPTION...]

DESCRIPTION

Downgrade Arch Linux packages.

OUTPUT

Calling downgrade on a package will lead to the following output:

Example:

-  1)  terraform    0.11.11  2  remote
-  2)  terraform    0.11.12  1  /var/cache/pacman/pkg
+  3)  terraform    0.11.13  1  remote
+  4)  terraform    0.11.13  1  /var/cache/pacman/pkg
-  5)  terraform    0.12.0   1  remote
-  6)  terraform    0.12.0   1  /var/cache/pacman/pkg
   7)  terraform    0.12.1   1  remote

Available packages (community):
7/7
>

The columns have the following meaning:

indicator
- indicates that the version was previously installed.
+ indicates the currently installed version.
enumeration
An enumeration of the entries for selection.
package-name
The name of the package.
package-epoch
The epoch of the package in cache or ALA.
package-version
The version of the package in cache or ALA.
package-release
The release of the package in cache or ALA.
location
Possible values: {remote|/path/to/cache/dir}

If you have already downloaded this version, it will show the cache directory where the package is located. remote indicates that the version is available on the ALA.

OPTIONS

--pacman=COMMAND
Pacman command, default is pacman.
--pacman-conf=PATH
Pacman configuration file, default is /etc/pacman.conf.
--pacman-cache=PATH
Pacman cache directory, default value(s) taken from pacman configuration file, or otherwise defaults to /var/cache/pacman/pkg. This option can be specified multiple times to indicate multiple cache directories.
--pacman-log=PATH
Pacman log file, default value is extracted from pacman configuration file, or otherwise defaults to /var/log/pacman.log.
--maxdepth=INTEGER
Maximum depth to search for cached packages, defaults to 1.
--ala-url=URL
Location of an ALA server, default is https://archive.archlinux.org.
--ala-only
Search ALA only.
--cached-only
Search local cache only.
--ignore=prompt|always|never
Whether to add packages to IgnorePkg, default is prompt.
--unignore PKG [PKG...]
Remove packages from IgnorePkg. This is a pass-through to pacignore(8).
--latest | --oldest
Never prompt for version or location, automatically pick the most up to date/most out of date version. Allows for noninteractive downgrades when used in conjunction with --ignore.
--prefer-cache
If a package matching the version filter is found in the cache, skip querying ala. Unlike --cached-only, --prefer-cache does query ala if no package could be matched in cache.
--version
Show downgrade version.
-h, --help
Show help script.

EXAMPLES

Downgrade packages checking both local cache and the A.L.A, which is the default behavior:

# downgrade foo bar

Downgrade packages, specifying multiple cache directories:

# downgrade --pacman-cache /path/to/cache --pacman-cache /path/to/other/cache foo bar

Downgrade a package with version-filtering:

# downgrade 'foo=1.0.0-1' 'bar>=1.2.1-1' 'baz=~^1.2'

Downgrade a package, looking in only local cache:

# downgrade --cached-only foo

Downgrade a package, looking in only the A.L.A.:

# downgrade --ala-only foo

Non-interactively downgrade foo to 1.0.0-1

# downgrade --latest --prefer-cache --ignore never 'foo=1.0.0-1'

CONFIGURATION FILE

Command-line options can be set persistently in /etc/xdg/downgrade/downgrade.conf. Note that these options are parsed first by downgrade, followed by any other command-line options provided by the user.

PACMAN OPTIONS

As per the usage syntax, any options supplied after the -- character sequence will be treated as pacman options.

DEFAULT BEHAVIORS

By default, downgrade will search both local caches and the ALA.

If only one package with its corresponding location matches, the package will be installed without further prompt from the user.

VERSION FILTERING

downgrade allows the use of the following version-filtering operators: =, ==, =~, <=, >=, < and >. Note that =~ represents a regex match operator and =/== are aliases.

EXIT CODES

downgrade will stop further processing and exit non-zero if it encounters any of the following scenarios for any of its arguments:

SEE ALSO

pacman(8), vercmp(8), sudo(8), pacman.conf(5), find(1), su(1), fzf(1).

BUGS

Open a GitHub issue on https://github.com/archlinux-downgrade/downgrade.

AUTHORS

  1. May 2025
  2. downgrade(8)