Sometimes you install programs or files and later want to delete them. If you try to use commands like "rm", you may end up with an error. Here we will explain to you how to properly uninstall the packages you installed.
Explanation
It is always recommended to use the commands related to packages to manage them and avoid commands such as rm, which have a less clever and more direct purpose.
The package management process can be specific depending on your Linux distribution. For example, on Debian-based distributions such as Ubuntu, you will use the apt-get or apt commands to install, upgrade, downgrade, remove, or any other package management operation. On other distributions such as ArchLinux, you will use the pacman command.
Solution
To uninstall packages on a Linux Distribution (assuming you're under a Debian-based distribution):
- If you want to uninstall a package, type:
apt remove your_package_name
or
apt-get remove your_package_name
- If you also want to remove all the packages configuration files, type (it can be done instead of remove or after the remove operation):
apt purge your_package_name
or
apt-get purge your_package_name
Do not try to use commands like rm your_package_name as you may end up with an error, or if you succeed in removing the package that way, you may end up with an unstable system. The rm command aims to delete folders and files without carrying too much if the element to remove is also managed by another subsystem (in the case of packages, it will throw an error).
Linux
- How to uninstall package in linux
- Linux uninstall package
- Ubuntu uninstall package
- How to install tar.gz in Ubuntu: using terminal > Guide
- How to install Flex and Bison Ubuntu > Guide
- Uninstalling linux and installing windows xp [solved] > Forum - Windows XP
- Xvideoservicethief 2018 linux hdd usb port not working problem solution > Forum - Hardware
- USB HDD's are not recognised on new computer > Forum - Hard Drive/SSD
- How to compile assembly code: in Linux, Windows, with NASM
- Search in Vim editor: Linux, for words
- Ubuntu remove password: for sudo, for user, for root
- How to disable avahi-daemon: Linux, Ubuntu
- Debian add printer: command line, install cups
- Change password Linux: script, terminal, Samba
- Debian change language: to English, command
- Linux read file line by line: for loop
- Vim autocomplete: C++, command
- Linux display file in reverse order
- How to install htop Linux: Ubtunu, Mint
- Restart network interface: Linux, Ubuntu
- How to create commands in Linux?
- Customize Wine on Linux: download, install, locate theme
- How to resize partition Linux: Gparted, command line
- How to remove the content of a directory: Linux
- How to recover lost admin password in CUPS?
- What is Daemon Log: in Linux
- How to split a file in Linux: split, merge
- How to convert DOS to UNIX: Linux, command
- Adding space in mount point: to FSTAB
- Delete lines in Linux: SED, commands
- Restoring Linux: from backup, using Tar