LinuxCommandLibrary

pactrans

handles package installation, removal, and system upgrades using the ALPM

TLDR

Install a package from repository

$ sudo pactrans --install [package]
copy
Remove a package
$ sudo pactrans --remove [package]
copy
Upgrade all installed packages
$ sudo pactrans --sysupgrade
copy
Install a package file
$ sudo pactrans --file [path/to/package.pkg.tar.zst]
copy
Replace local package with repository version
$ sudo pactrans local/[old_package] [repo]/[new_package]
copy
Print what would happen without executing
$ pactrans --print-only --install [package]
copy

SYNOPSIS

pactrans [--install|--remove|--sysupgrade] [--file] [--print-only] [packages...]

DESCRIPTION

pactrans handles package installation, removal, and system upgrades using the ALPM (Arch Linux Package Management) library. It provides a unified interface for common package operations.
The tool supports mixed operations, allowing package installation and removal in a single transaction. Package specifications can include repository prefixes for precise control over package sources.

PARAMETERS

--install

Install packages from configured repositories
--remove
Remove installed packages
--sysupgrade
Upgrade all installed packages
--file
Install from local package file
--print-only
Show what would be done without making changes
--config _file_
Use alternate pacman configuration
--dbpath _path_
Use alternate database path

CAVEATS

Requires root privileges for system modifications. Uses pacman's configuration and database. Part of the pacutils package. Transaction conflicts must be resolved manually.

HISTORY

pactrans is part of pacutils, created by Andrew Gregory. It provides a programmatic interface to ALPM transactions, useful for scripts and automation that need fine-grained control over package operations.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community