• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

pacman –remove Command Examples in Linux

by Deepika

“pacman –remove” is an option for the pacman package manager in Arch Linux and its derivatives. It is used to remove installed packages from the system.

When used with the name of one or more packages, “pacman –remove” uninstalls those packages and any dependencies that are no longer needed. It is important to note that the packages being removed must not be required by any other installed packages; otherwise, pacman will refuse to remove them.

pacman –remove Command Examples

1. Remove a package and its dependencies:

# sudo pacman --remove --recursive {{package_name}}

2. Remove a package and both its dependencies and configuration files:

# sudo pacman --remove --recursive --nosave {{package_name}}

3. Remove a package without prompting:

# sudo pacman --remove --noconfirm {{package_name}}

4. Remove orphan packages (installed as dependencies but not required by any package):

# sudo pacman --remove --recursive --nosave $(pacman --query --unrequired --deps --quiet)

5. Remove a package and all packages that depend on it:

# sudo pacman --remove --cascade {{package_name}}

6. List packages that would be affected (does not remove any packages):

# pacman --remove --print {{package_name}}

7. Display help for this subcommand:

# pacman --remove --help

Summary

In summary, “pacman –remove” is a useful option for removing packages from the system in Arch Linux and its derivatives. It allows the user to easily and safely remove packages that are no longer needed, freeing up disk space and reducing the number of unnecessary packages on the system.

Filed Under: Linux

Some more articles you might also be interested in …

  1. fail2ban-client Command Examples in Linux
  2. ar – Create, modify, and extract from archives (.a, .so, .o)
  3. ioping: command not found
  4. How to configure apache virtual host on ubuntu
  5. Linux OS Service ‘kdump’
  6. “az login” Command Examples (Log in to Azure)
  7. How to make a LED flash with the Raspberry Pi
  8. make Command Examples in Linux
  9. e2fsck: command not found
  10. “git credential” Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright