Windows
Linux
Package Management
Windows msiexec /x equivalent in Linux
Removes software installed through the distribution package manager.
Windows
→
msiexec /x
Linux equivalents
sudo apt remove PACKAGE
sudo dnf remove PACKAGE
sudo pacman -Rns PACKAGE
Overview
What this command does
Removes software installed through the distribution package manager.
Migration tip: Use the same package manager that installed the software. Package names may differ from the application name shown in menus.
Practical tasks
Common use cases
Uninstall a package
Removes software installed through the distribution package manager.
sudo apt remove package
Remove a Debian package
sudo pacman -Rns package
Remove an Arch package and unneeded dependencies
sudo dnf remove package
Remove a Fedora package
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
sudo apt remove package
sudo pacman -Rns package
sudo dnf remove package
Walkthrough
Examples with explanations
sudo apt remove package # uninstall on Debian or Ubuntu
sudo pacman -Rns package # uninstall on Arch and clean dependencies
sudo dnf remove package # uninstall on Fedora
Reference
Common options and variations
| Command or option | Use |
|---|---|
sudo apt remove package | Remove a Debian package |
sudo pacman -Rns package | Remove an Arch package and unneeded dependencies |
sudo dnf remove package | Remove a Fedora package |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
This workflow changes mostly by Linux distribution package manager: Debian/Ubuntu uses apt, Fedora uses dnf, and Arch uses pacman.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | apt | sudo apt remove PACKAGE |
Use apt purge PACKAGE for package config removal too. |
| Fedora | dnf | sudo dnf remove PACKAGE |
Removes RPM packages from the system. |
| Arch | pacman | sudo pacman -Rns PACKAGE |
Removes package plus now-unused dependencies. |
Important
What to watch out for
Dependency-cleanup options can remove additional packages. Review the package manager transaction before confirming.
Keep learning