PACTRANS(1) pactrans PACTRANS(1)

pactrans, pacinstall, pacremove - install/remove alpm packages

pactrans   [options] <target>...
pacinstall [options] <target>...
pacremove  [options] <target>...
pactrans   (--help|--version)

Install/remove alpm packages. The pacinstall and pacremove aliases are provided as a convenience, differing only in their default interpretation of targets. Otherwise, they are identical.

If stdin is not connected to a terminal, pkgspecs to install/remove will be read from stdin.

Operation options affect the interpretation of all targets following them until another operation option is encountered.

Interpret following targets as pkgspecs. If a pkgspec indicates a package file or a repository package, it will be installed. If it indicates a package in the local database, it will be removed. See PKGSPEC for details on the format.
Interpret following targets as packages to be installed from a repository. If only the package name is provided repositories will be searched in the order they are declared.
Interpret following targets as package names to be uninstalled.
Interpret following targets as paths to package files to be installed.
Upgrade installed packages.

Set an alternate cache directory path.
Set an alternate configuration file path.
Set an alternate sync database extension.
Set an alternate database path.
Set an alternate log file path.
Set an alternate installation root.
Set an alternate system root. See pacutils-sysroot(7).
Set an alternate separator for values parsed from stdin. By default a newline "\n" is used as the separator. If --null is used without specifying sep "NUL" will be used.
Display additional debugging information.
Display the what the transaction would do and exit.
Assume default responses to all prompts.
Disable low-speed timeouts for downloads.
Display usage information and exit.
Display version information and exit.

Update sync databases before performing the transaction.
Make the changes to the database without actually extracting or removing any packages.
Ignore dependency versions. Pass twice to ignore dependency checks altogether.
Do not run package install scripts.
Do not run transaction hooks.
Behave as if package is installed.

Ignore upgrades for package package. package may be a shell-style glob pattern.
Ignore upgrades for any packages in group group. group may be a shell-style glob pattern.

--install/--file Options

Mark all installed packages as dependencies.
Mark all installed packages as explicitly installed.
Download packages without actually installing them.

--remove Options

Uninstall all installed packages that depend on a package being uninstalled.
Do not save .pacsave backups.
Uninstall any dependencies of packages being removed that are not required by any other packages.
Do not uninstall any packages required by an installed package.

Select a method to use for resolving conflicts. Possible values for method are:
"prompt"
Prompt the user to remove the installed conflicting package.
"none"
Do not remove any conflicting packages.
"all"
Remove any conflicting packages.
"provided"
Remove a conflicting package if the new package provides it.
"depends"
Remove a conflicting package if it was installed as a dependency.
"provided-depends"
Remove a conflicting package if it was installed as a dependency and the new package provides it.
Select a method to use for resolving replacements. Possible values for method are:
"prompt"
Prompt the user to replace the package.
"none"
Do not replace any packages.
"all"
Perform all available package replacements.
"provided"
Perform replacements where the new package provides the old one.
"depends"
Perform replacements where the old package was installed as a dependency.
"provided-depends"
Perform replacements where the old package was installed as a dependency and the new package provides the old one.
Set the disposition for prompts to install ignored packages.
Set the disposition for prompts to delete corrupt package.
Set the disposition for prompts to select a provider. If set to "yes", the first available provider will be selected.
Set the disposition for prompts to skip packages with unresolvable dependencies.
Set the disposition for prompts to import missing PGP keys.
Set all prompt disposition options to their "all" or "yes" value and set --no-confirm.

NOTE: regardless of the disposition options chosen, all dependencies must still be satisfied in order for the transaction to succeed unless --nodeps is used as well.

A pkgspec is a string that can identify an individual package. Accepted formats are:

<repository>/<package>
core/pacman
local/pacman
<proto>://<path/to/package/file>
file:///var/cache/pacman/pkg/pacman-4.1.0-1-x86_64.pkg.tar.xz

pactrans local/foo baz/bar

Or, if bar's repository is unknown:

pacinstall bar --remove foo
pactrans --install foo bar

pactrans determines whether or not to read pkgspecs from stdin based on a naive check using isatty(3). If pactrans is called in an environment, such as a shell function or script being used in a pipe, where stdin is not connected to a terminal but does not contain pkgspecs to install/remove, pactrans should be called with stdin closed. For POSIX-compatible shells, this can be done with "<&-".

2024-04-16 pacutils