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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. SSHFS (Secure SHell FileSystem) – Securely Mount remote filesystem over ssh
  2. Magento 2.3.3 Redis cache grows unlimited
  3. How to uninstall lammps package from Ubuntu
  4. CentOS / RHEL 7 : How to install and configure ftp server (vsftpd)
  5. How to Create Disk Partitions using cfdisk
  6. modprobe Command Options
  7. debugfs Command Examples in Linux
  8. How to block non-root user from creating crontab entry in Linux
  9. The Ultimate Beginner’s Guide to Static Website Hosting With Google Firebase (for FREE)
  10. What are SELinux Modes and how to set them

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright