← 返回命令列表

Linux command

pacman-r 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Remove a package

sudo pacman -R [package]

Remove a package and its unneeded dependencies

sudo pacman -Rs [package]

Remove a package, its dependencies, and configuration files

sudo pacman -Rns [package]

Remove a package without checking dependencies

sudo pacman -Rdd [package]

List packages that would be removed

pacman -Rsp [package]

Example

tldr pacman remove

说明

pacman -R is the short form of pacman --remove, which removes packages from the system. It handles dependency checking and can optionally remove configuration files and orphaned dependencies.

参数

-c, --cascade
Remove all target packages and packages that depend on them.
-n, --nosave
Remove configuration files that would otherwise be saved as .pacsave files.
-s, --recursive
Remove dependencies not required by other packages.
-u, --unneeded
Remove targets only if they are not required by any other packages.
-p, --print
Print targets instead of performing the operation.
-d, --nodeps
Skip dependency checks. Pass twice (-dd) to also skip required-by checks.

FAQ

What is the pacman-r command used for?

pacman -R is the short form of pacman --remove, which removes packages from the system. It handles dependency checking and can optionally remove configuration files and orphaned dependencies.

How do I run a basic pacman-r example?

Run `sudo pacman -R [package]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c, --cascade do in pacman-r?

Remove all target packages and packages that depend on them.