Linux command
pacman-upgrade 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Install
sudo pacman -U path/to/package.pkg.tar.zst
Example
sudo pacman -U --noconfirm path/to/package.pkg.tar.zst
Overwrite
sudo pacman -U --overwrite path/to/file path/to/package.pkg.tar.zst
Skip
sudo pacman -Ud path/to/package.pkg.tar.zst
Preview
pacman -Up path/to/package.pkg.tar.zst
说明
pacman -U (upgrade) installs packages from local archive files rather than from remote repositories. This is useful for installing locally built packages, AUR packages, or downgrading to older package versions.
参数
- -U, --upgrade
- Upgrade or install from package files
- -d, --nodeps
- Skip dependency version checks
- -p, --print
- Print what would be installed without installing
- --overwrite _glob_
- Overwrite conflicting files matching the glob pattern
- --noconfirm
- Skip confirmation prompts
- --asdeps
- Mark packages as non-explicitly installed (dependencies)
- --asexplicit
- Mark packages as explicitly installed
FAQ
What is the pacman-upgrade command used for?
pacman -U (upgrade) installs packages from local archive files rather than from remote repositories. This is useful for installing locally built packages, AUR packages, or downgrading to older package versions.
How do I run a basic pacman-upgrade example?
Run `sudo pacman -U path/to/package.pkg.tar.zst` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -U, --upgrade do in pacman-upgrade?
Upgrade or install from package files