LinuxCommandLibrary

pacman-u

Upgrade installed packages

TLDR

View documentation for the original command

$ tldr pacman upgrade
copy

SYNOPSIS

pacman -U <package_file(s)> [<options>]

PARAMETERS

<package_file(s)>
    Path(s) to the package archive(s) to install.

--add
    Add package(s) to database but do not install.

--ask=[yes|no]
    Configure whether to prompt for optional dependencies (default: yes).

--asdeps
    Mark the package(s) as installed as a dependency.

--asexplicit
    Mark the package(s) as explicitly installed.

--assume-installed <package=version>
    Add package(s) to list of packages to consider as already installed (can be used multiple times).

--config <path>
    Use an alternate configuration file.

--debug
    Display debug information.

--force
    Bypass file conflict checks. Use with caution!

--help
    Display a help message and exit.

--noconfirm
    Bypass any and all confirmation prompts.

--nodeps
    Skip dependency version checks. Use with extreme caution!

--needed
    Do not reinstall the targets if they are already up-to-date.

--noscriptlet
    Do not run the install scriptlet if one is present in the package.

--print
    Print the targets and exit.

--sysroot <path>
    Operate on a given root directory.

--verbose
    Be verbose.

--version
    Display version information and exit.

DESCRIPTION

The pacman -U command is used to add or update packages from a local archive. It directly installs a package from a file rather than downloading it from a repository. This is useful when you have a package file you've built yourself, downloaded from a third party, or need to install a specific version of a package that is not available in the official repositories. This is a very different usage than pacman -Syu, which syncs with the repos.

CAVEATS

Using pacman -U with the --nodeps or --force options can lead to system instability. Ensure the packages you are installing are compatible with your system and dependencies are met correctly. Always double-check the source of the package file before installing. Be aware that you will not receive updates for packages installed using pacman -U from official repositories unless the package is also available in those repositories, and has a higher version number. Also, using -U does NOT sync the repositories with -Syu. Running -Syu afterwards can potentially overwrite files from the local installation.

EXAMPLES

Install a local package:
pacman -U mypackage-1.0-1-x86_64.pkg.tar.zst
Install multiple local packages:
pacman -U mypackage1-1.0-1-x86_64.pkg.tar.zst mypackage2-2.0-1-x86_64.pkg.tar.zst
Force install ignoring file conflicts:
pacman -U --force mypackage-1.0-1-x86_64.pkg.tar.zst

SEE ALSO

pacman(8), pacman-S(8), pacman-Sy(8), makepkg(1)

Copied to clipboard