Forrest logo
back to the pacman tool

pacman-remove:tldr:c0137

pacman-remove: Remove a package and all packages that depend on it.
$ sudo pacman --remove --cascade ${package_name}
try on your machine

This command is used to remove a package from a system that uses the Pacman package manager (commonly found in Arch Linux-based distributions). The command has the following options:

  • sudo: This is used to run the command with administrative privileges, as the removal of packages typically requires elevated privileges.

  • pacman: This is the actual package manager executable.

  • --remove: This option instructs Pacman to remove the specified package(s) from the system.

  • --cascade: This option tells Pacman to remove all packages that were installed as dependencies of the specified package but are no longer required by any other installed package. In other words, it removes packages that were installed solely to satisfy dependencies.

  • ${package_name}: This is a placeholder for the name of the package you want to remove. You should replace it with the actual name of the package you wish to uninstall.

By running this command with the appropriate package name, you will remove the specified package and any associated dependencies that are no longer needed.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pacman tool