- Linux uninstall package / software using the CLI
- Linux uninstall package / software
- Ubuntu/Debian Linux uninstall software
- RHEL/CentOS/Oracle Linux
- Fedora Linux
- Arch Linux
- OpenSUSE or SUSE Linux removing package command
- Alpine Linux
- Conclusion
- How to Uninstall Programs from your Ubuntu System
- Uninstall Applications Through Ubuntu Software Manager
- Uninstall Applications Through the Command Line
- Use apt-get remove command
- Use apt-get purge command
- Bonus: Cleanup the Mess with autoremove
- Karim Buzdar
- How to Uninstall Applications from Ubuntu Linux
- Method 1: Remove applications using Ubuntu Software Center
- Method 2: Remove programs from Ubuntu using command line
- Tip: Using apt purge for removing package (advanced users)
- Method 3: Uninstall Snap applications in Ubuntu
- Bonus Tip: Clean up your system with one magical command
- Conclusion
- Uninstalling programs by command line.
- Removing remaining libraries
Linux uninstall package / software using the CLI
Linux uninstall package / software
- First, you need to find a list of all installed packages on Linux.
- To uninstall an application, you need to use Linux distro-specific command. For example, use the apt command on Debian or Ubuntu Linux. RHEL/CentOS/Fedora Linux users need to run either the dnf or yum command and so on.
- Finally, we can use various commands for verification of the uninstallation of a program on Linux.
Let us see all commands in action to uninstall a program on Linux.
Ubuntu/Debian Linux uninstall software
The syntax is as follows to list all installed packages on Debian or Ubuntu Linux using the apt command:
apt list —installed
How to find out exact package names in Debian/Ubuntu/Mint Linux
Use the ‘ dpkg —list ‘ command to get a list of all installed packages on an Ubuntu or Debian/Mint Linux
grep command in action to filter out package names quickly that you want to uninstall
RHEL/CentOS/Oracle Linux
We need to use the yum command for CentOS/RHEL v6.x/7.x. First get a list, run:
sudo yum list installed
sudo yum list installed | grep package
sudo yum list installed | grep zip
yum command in action
Fedora Linux
Again, we need to the dnf command as follows:
## List all installed packages ##
sudo dnf list installed
## Filter out the package named httpd ##
sudo dnf list installed | grep httpd
## Delete the httpd ##
sudo dnf remove httpd
Arch Linux
We use the pacman command on Arch Linux to uninstall software. Pass the Q to list all installed packages on Arch Linux:
sudo pacman Q
sudo pacman Q | more
sudo pacman Q | grep sl
To delete/remove the sl package in Arch, run:
sudo pacman -R sl
pacman command in action to list and uninstall package on an Arch Linux
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
OpenSUSE or SUSE Linux removing package command
We are going to use the zypper command. To list all installed packages in SUSE/OpenSUSE, run:
sudo zypper packages —installed-only
sudo zypper packages —installed-only | grep -i package
sudo zypper packages —installed-only | grep -i zip
I am going to remove the zip package, enter:
sudo zypper remove package
sudo zypper remove zip
Alpine Linux
Use the apk command to list installed packages only:
sudo apk list
sudo apk list -I
sudo apk list -I ‘package’
sudo apk list -I ‘zip’
To uninstall the zip Linux uninstall software pass the del as follows:
sudo apk del pkg
sudo apk del zip
apk command in action
Conclusion
You learned how to uninstall package on popular Linux distros. I would strongly recommend reading the man pages:
man yum
man dnf
man apt
man zypper
man pacman
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Источник
How to Uninstall Programs from your Ubuntu System
This article describes removing software from your Ubuntu system that you do not need anymore. We are describing software removal both through the graphical user interface (Ubuntu Software Manager) and the command line-the (Terminal).
Please note that you need administrative privileges in order to install/uninstall software from Ubuntu.
We have run the commands and procedures mentioned in this article on Ubuntu 20.04 LTS.
Uninstall Applications Through Ubuntu Software Manager
One way to uninstall software from your computer is through the Ubuntu Software Manager. Click on the Ubuntu Software icon in the Activities toolbar; this will open the Ubuntu Software manager through which you can search for, install and uninstall software from your computer.
Then click the Installed tab from the following view to list all the applications installed on your Ubuntu system:
From the list of applications, look up for the one you want to uninstall and then click the Remove button against it.
In this example, I am removing a software called XCFA from my system by clicking the Remove button against it. When you try to remove an application, the following type of confirmation message appears:
Click the Remove button when you are sure that you want to remove the selected application. When you do so, the following authentication dialog will appear as only an authorized user can remove an application from Ubuntu:
Enter the password for Administrator or a sudo user and then click the Authenticate button.
The selected software will now be removed from your system.
Uninstall Applications Through the Command Line
You can remove installed software from your system through apt-get remove and apt-get purge commands as sudo. But first, you need to know the exact package name through which you installed the software.
The following command will list all the packages installed on your system:
You may want to copy the exact package name; select it, right click and then copy it from the dpkg list for further use.
Use apt-get remove command
The apt-get remove command removes a software from your system but keeps the configuration files and any plugins and settings that you might have installed later. This helps in keeping the same settings when you want to reinstall the software.
Run the following command as sudo in order to remove a software;
You will be asked the password for sudo and given the information about what will be removed from your system.
In this example, I will be removing the OpenJDK package named “openjdk-11-jdk” from my system.
The system will also prompt with a y/n option in order to re-confirm the uninstall procedure. When you click Y, the process will begin and the software will be removed from your system.
Use apt-get purge command
If you want to remove an application completely from your system, also removing any personalized settings, it is best to use the apt-get purge command.
In this example, I will be removing the OpenJDK package named “openjdk-11-jdk:amd64” from my system.
Run the following command as sudo in order to remove a software;
You will be asked the password for sudo and given the information about what will be removed from your system.
The system will also prompt with a y/n option in order to re-confirm the uninstall procedure. When you click Y, the process will begin and the software will be removed from your system.
Bonus: Cleanup the Mess with autoremove
In case you want to remove any dependencies such as the applications and libraries used by the software you once installed that is no longer in use, you can do some housekeeping through the following command:
This will list all the obsolete and unused packaged and left over dependencies taking up important space on your system.
The system will also prompt with a y/n option in order to re-confirm the uninstall procedure. When you click Y, the process will begin and the unwanted software dependencies will be removed from your system.
You have learned two ways to uninstall software from your Ubuntu system; through the Ubuntu Software manager and through the command line. Through the command line, you can opt either to remove the software and keep all the configuration files (apt get remove) or completely remove the software (apt-get purge).
Karim Buzdar
About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn
Источник
How to Uninstall Applications from Ubuntu Linux
Last updated January 20, 2021 By Abhishek Prakash 19 Comments
Don’t use a certain application anymore? Remove it.
In fact, removing programs is one of the easiest ways to free up disk space on Ubuntu and keep your system clean.
In this beginner’s tutorial, I’ll show you various ways of uninstalling software from Ubuntu.
Did I say various ways? Yes, because there are various ways of installing applications in Ubuntu and hence various ways of removing them. You’ll learn to:
- Remove applications from Ubuntu Software Center (for desktop users)
- Remove applications using apt remove command
- Remove snap applications in command line (intermediate to advanced users)
Let’s see these steps one by one.
Method 1: Remove applications using Ubuntu Software Center
Start the Software Center application. You should find it in the dock on the left side or search for it in the menu.
You can see the installed applications in the Installed tab.
If you don’t see a program here, try to use the search feature.
Search Installed Apps Ubuntu
When you open an installed application, you should see the option to remove it. Click on it.
Remove Applications Ubuntu
It will ask for your account password. Enter it and the applications will be removed in seconds.
This method works pretty well except in the case when Software Center is misbehaving (it does that a lot) or if the program is a software library or some other command line utility. You can always resort to the terminal in such cases.
Method 2: Remove programs from Ubuntu using command line
You know that you can use apt-get install or apt install for installing applications. For uninstalling, you don’t use the apt-get uninstall command but apt-get remove or apt remove .
All you need to do is to use the command in the following fashion:
You’ll be asked to enter your account password. When you enter it, nothing is visible on the screen. That’s normal. Just type it blindly and press enter.
The program won’t be removed immediately. You need to confirm it. When it asks for your conformation, press the enter key or Y key:
Keep in mind that you’ll have to use the exact package name in the apt remove command otherwise it will throw ‘unable to locate package error‘.
Don’t worry if you don’t remember the exact program name. You can utilize the super useful tab completion. It’s one of the most useful Linux command line tips that you must know.
What you can do is to type the first few letters of the program you want to uninstall. And then hit the tab key. It will show all the installed packages that match those letters at the beginning of their names.
When you see the desired package, you can type its complete name and remove it.
What if you do not know the exact package name or even the starting letters? Well, you can list all the installed packages in Ubuntu and grep with whatever your memory serves.
For example, the command below will show all the installed packages that have the string ‘my’ in its name anywhere, not just the beginning.
That’s cool, isn’t it? Just be careful with the package name when using the remove command in Ubuntu.
Tip: Using apt purge for removing package (advanced users)
When you remove a package in Ubuntu, the packaged data is removed, but it may leave small, modified user configuration files. This is intentional because if you install the same program again, it would use those configuration files.
If you want to remove it completely, you can use apt purge command. You can use it instead of apt remove command or after running the apt remove command.
Keep in mind that the purge command won’t remove any data or configuration file stored in the home directory of a user.
Method 3: Uninstall Snap applications in Ubuntu
The previous method works with the DEB packages that you installed using apt command, software center or directly from the deb file.
Ubuntu also has a new packaging system called Snap. Most of the software you find in the Ubuntu Software Center are in this Snap package format.
You can remove these applications from the Ubuntu Software Center easily but if you want to use the command line, here’s what you should do.
List all the snap applications installed to get the package name.
Now use the package name to remove the application from Ubuntu. You won’t be asked for confirmation before removal.
Bonus Tip: Clean up your system with one magical command
Alright! You learned to remove the applications. Now let me tell you about a simple command that cleans up leftover package traces like dependencies that are no longer used, old Linux kernel headers that won’t be used anymore.
In the terminal, just run this command:
This is a safe command, and it will easily free up a few hundred MB’s of disk space.
Conclusion
You learned three ways of removing applications from Ubuntu Linux. I covered both GUI and command line methods so that you are aware of all the options.
I hope you find this simple tutorial helpful as an Ubuntu beginner. Questions and suggestions are always welcome.
Like what you read? Please share it with others.
Источник
Uninstalling programs by command line.
Linux has different methods to install programs, you can install from the repositories, either by a package manager or by command line, or by compiling the source code of the program to install. In the same way, and as expected, Linux has different methods for uninstalling packages and programs.
You can uninstall programs from the software center of your distro, or from a terminal. For the first, the method of installing / uninstalling programs depends largely on the software center of the distribution you use, while the second is a fairly simple and consistent procedure within Gnu / Linux systems.
The truth, it may be more convenient to uninstall programs from terminal. This is because despite the fact that many still do not feel comfortable working with the command line, it is precisely there where you can see exactly what you are running / installing and in this case, uninstalling from your computer.
To remove a show from your distribution, we will use the same library apt. Run:
Many times, the application can be derived from multiple packages, as well as generating various configuration files created by the program. Therefore, when executing the above command, only the program is uninstalled, but the rest of the packages and configuration files used by the program are still kept.
To uninstall the program and in turn, delete all the files associated with it within the distro, run:
So that –Purge on the line, it is in charge of eliminating the files associated with the program that is being uninstalled.
In the case of wanting to uninstall a program without touching the configuration files, you execute the first line, in the event that you want to delete everything, then you execute the second, it all depends on what you want to eliminate.
Removing remaining libraries
When you install a program, it usually asks for permission to install some libraries and dependencies that it needs to be used. At the time of uninstalling the program, these libraries are wandering through your distribution looking for a program to belong to. The truth is that these must also be eliminated
now, all the dependencies that were still there will be uninstalled anyway.
Also, you can combine the actions, and run a single command line:
For all cases, in the uninstallation process within the terminal it advises which packages will be uninstalled, how much memory space will be freed after installation, and of course, if you agree. After accepting, pressing S, the uninstallation of the program will be completed.
Note: The command apt-get can also be replaced by aptitude, for all executables within the post.
The content of the article adheres to our principles of editorial ethics. To report an error click here!.
Full path to article: From Linux » GNU / Linux » Uninstalling programs by command line.
Источник