pacremove
Remove installed packages
TLDR
View documentation for the original command
SYNOPSIS
pacremove [options] <package(s)>
PARAMETERS
<package(s)>
One or more package names to be removed.
-s, --recursive
Removes dependencies that are not required by any other installed package. This is a common part of pacremove aliases.
-n, --nosave
Removes configuration files, even if they are modified. This ensures a cleaner removal but discards custom settings.
-c, --cascading
Removes the target package and all of its dependencies that are not required by other packages. Equivalent to -Rsc.
-d, --nodeps
Skips dependency checks, allowing removal of a package even if other packages depend on it. Use with caution.
-p, --print
Performs a 'dry run'; prints the list of packages that would be removed without actually removing them.
-u, --unneeded
Removes unneeded dependencies. Functionally similar to -s when used with -R.
DESCRIPTION
pacremove is a widely adopted alias or script wrapper within the Arch Linux ecosystem, serving as a shorthand for the powerful pacman -R command. Its primary function is to uninstall specified packages from the system. Often configured to use options like -s (recursive) and -n (nosave), it not only removes the target package but also automatically identifies and uninstalls dependencies that are no longer required by any other installed software. Furthermore, with -n, it ensures a thorough cleanup by deleting associated configuration files, even if they've been modified. This command is indispensable for maintaining a clean system, managing software installations effectively, and reclaiming disk space. Users define pacremove to streamline their workflow, typically aliasing it to a command such as
sudo pacman -Rns or sudo pacman -Rsc.
CAVEATS
The command pacremove is not a standard Linux utility; it's almost always a user-defined alias or a helper script wrapper for pacman -R. Its exact behavior depends entirely on how it's defined on a particular system. Common definitions include sudo pacman -Rns or sudo pacman -Rsc.
Removing critical system packages can render your system unusable. Always verify the packages being removed, especially when using options like -c. Running as root or with sudo is required for package removal operations.
COMMON ALIASES
Most commonly, pacremove is aliased to sudo pacman -Rns, which means 'remove recursively, with no save' (i.e., remove dependencies and configuration files). Another popular alias is sudo pacman -Rsc, which performs a 'cascading' removal, ensuring comprehensive cleanup of the package and its orphaned dependencies.
DEPENDENCY MANAGEMENT
The intelligent dependency handling of pacman -R (and thus pacremove) is a key feature. When used with -s or -c, it ensures that only dependencies truly 'unneeded' by any other installed package are removed. This prevents accidental breakage of other software.
HISTORY
While pacman itself has been the official package manager for Arch Linux since its inception, the concept of pacremove as a convenience command evolved organically within the Arch user community. Users frequently found themselves typing lengthy commands like sudo pacman -Rns for routine package removals. To streamline this process and enhance user experience, many adopted shell aliases (e.g., in their .bashrc or .zshrc files) or created simple scripts named pacremove. This informal standardization reflects the Arch philosophy of user control and efficiency.


