Remove app on linux

Удаление программ Linux

Не всегда нам нужно только устанавливать программы. Иногда нужно очистить систему или удалить лишние пакеты и файлы чтобы освободить место на диске. Удаление программ в большинстве случаев выполняется очень просто вне зависимости от дистрибутива. Но иногда могут возникнуть сложности, например, с программами, которые сами создают множество файлов в файловой системе или программы, установленные вручную.

В этой статье мы рассмотрим как выполняется удаление программ Linux в разных дистрибутивах, какие программы можно использовать и какие команды нужны. Остановимся на том, как полностью удалить программу, чтобы она не оставляла следов в системе.

1. Удалить программу через GUI

В Ubuntu и многих других дистрибутивах необязательно использовать консоль для удаления программ, существуют центры приложений и графические интерфейсы. Здесь достаточно запустить утилиту, выбрать нужную программу или пакет и удалить ее. Например, во многих дистрибутивах применяется Gnome Software. Сначала запустите его из главного меню:

Затем найдите нужную программу, например, Gimp:

Откройте ее и нажмите кнопку «Удалить»:

Далее, подтвердите что ее нужно удалить и введите пароль суперпользователя:

После завершения работы, программа будет полностью удалена с вашего компьютера.

2. Удаление программ через пакетный менеджер

Самый простой и часто используемый способ удалить программу linux — это использовать стандартный пакетный менеджер из терминала. Если вы использовали пакетный менеджер для установки программы то единственным верным способом ее удаления будет тоже он. В зависимости от дистрибутива команды удаления будут отличаться, но, в целом, они будут иметь похожий синтаксис. Мы рассмотрим примеры для самых популярных дистрибутивов. Например, нам нужно удалить Firefox. В Ubuntu, Debian, Linux Mint и других дистрибутивах этого семейства команда будет выглядеть вот так:

sudo apt remove firefox

Эта команда удалит пакет из системы, но некоторые конфигурационные файлы останутся и будут занимать место. Чтобы полностью удалить программу используйте опцию purge:

sudo apt purge firefox

Более подробно о том, как удалить программу в Linux в Ubuntu мы рассматривали в отдельной статье, в том числе и работу с PPA. Для удаления пакета в CentOS или Red Hat выполните:

sudo yum remove firefox

В Fedora и основанных на ней дистрибутивах, кроме Red Hat, используется новый пакетный менеджер — dnf:

sudo dnf remove firefox

В OpenSUSE используется собственный пакетный менеджер — zypper:

sudo zypper remove firefox

Удаление программ Linux с помощью пакетного менеджера позволяет полностью очистить систему от остатков программы. После завершения удаления рекомендуется перезагрузить компьютер, чтобы убедиться, что все файлы были удалены. Теперь вы знаете как удалить программу в Linux через терминал.

Пакетный менеджер раскладывал файлы программы по системе, а значит он знает что и где находится, значит сможет все правильно удалить. Но если вы компилировали программу и устанавливали ее установочным скриптом, то вы не сможете удалить ее с помощью пакетного менеджера, поскольку он ничего не знает о ней.

3. Удаление программ без пакетного менеджера

Здесь тоже есть несколько вариантов. Если вы устанавливали программу из исходников с помощью компиляции и make install, то она разложена по всей системе. А это значит, что вы не сможете просто зайти и удалить папку с ней, как в Windows. Вам придется использовать тот же скрипт, что вы использовали для установки. Откройте терминал и выполните:

cd /папка/с/исходниками
$ sudo make uninstall

Первая команда переходит в папку с исходниками, вторая — удаляет программу. Если скрипта не сохранилось, то вы можете скачать его из интернета. Иначе программу не удалить. Еще один вариант установки программ — с помощью скрипта из официального сайта. Такие программы удалить намного проще. Они устанавливаются, как правило, в одну папку, для них существует специальный каталог в файловой системе Linux. Здесь они создают новую папку, где расположены все их файлы, включая исполняемые и файлы настроек. Например, чтобы удалить браузер Google Chrome, установленный, таким образом, нужно набрать:

Читайте также:  Максимальный объем озу для windows

sudo rm -Rf /opt/google-chrome/

Возможно, после удаления программы, вам стоит проверить папку /etc, так как там обязательно должны были остаться файлы настроек пути к библиотекам этой программы, исполняемым файлам и файлы сервисов. Также после удаления программ рекомендуется делать очистку системы Ubuntu.

Выводы

В этой статье мы рассмотрели как выполняется удаление программ Linux для различных дистрибутивов. Как видите, если правильно подходить к установке, то удалить программу очень просто. Сложности возникнут только если вы использовали нестандартные пути получения программ, что очень не рекомендуется.

Источник

4 Ways to Uninstall Software in Linux Mint

At some point, you will have to remove programs from your Linux Mint. In this post, you will learn 4 different ways to uninstall software in Linux Mint.

INTRODUCTION

Usually, in Linux, there are always several ways to do one thing. For example, to install/uninstall an application, some prefer the use of the terminal, while others stick to a software manager.

It also happens there several ways to uninstall software in Linux Mint. I will show you 4 ways to do that and you will be able to pick your favorite.

  1. The simplest way is to right-click on an application in the main menu.
  2. You can uninstall an application using the software manager.
  3. If you use Synaptic, you can also do it from there.
  4. Finally, you can always go conservative and use the Linux Mint terminal.

The first two options are clearly focused on the novice user, while the last two are for more advanced users. So, let us start.

VIDEO TUTORIAL

1. Using the right-click in the menu

This is the easiest way to uninstall software in Linux Mint. This method is intended for novices and it is the simplest way. I must confess that I have been using Linux Mint for years and I did not know about this feature.

So, you have to open the Linux Mint menu and look for a program you want to uninstall. I will be uninstalling GIMP image editor as an example. You right-click on the program and you will see the option to uninstall it.

After that, you have to type your user password. Then, you need to confirm that you want to uninstall the software. After this, the program will be removed from your system.

As you can see, you can uninstall software in Linux Mint can be really quick.

By the way, if you liked this Linux Mint icons, you can read how to install them in these Linux Mint icons and themes post.

2. Using the Software Manager

The second way to uninstall software in Linux Mint is through the Software Manager. So, you open Linux Mint Software Manager.

Then, search for the program you want to uninstall. Again, I will use GIMP here.

Finally, click on the Remove button and it will start the uninstall process.

As you can see, this way requires more steps than the previous one, but it may be useful if you are testing different programs and you need to remove a program without leaving the Software Manager.

3. Using Synaptic package manager

Similarly to the previous way, you can uninstall programs on Linux Mint is by using the Synaptic package manager. Synaptic is also a software manager but it is a bit more advanced than the Linux Mint Software Manager.

So, open Synaptic from the main menu.

Next, in the search field, type the name of the program you want to remove. Again, in this case, I will remove GIMP. Select the package and right-click on it.

Here, you have two options to uninstall it:

  1. Mark for Removal
  2. Mark for Complete Removal

Mark for Removal will just remove a program. Basically, it will do the same what has been done through the Linux Mint menu and through the Software Manager. The second option, Mark for Complete Removal, in addition to removing the program, will also remove all the configuration files in your /etc directory. So, this way you can keep your system clean.

Читайте также:  Как устанавливать драйвер во время установки windows 10

Note that this uninstall does not remove the configuration files from your home directory. If you want to completely get rid of all files associated with a program, you need to remove its config files from your home directory manually. To find these files, unable “Show hidden files” in the view menu of your file manager and search for folders with the program name you want to remove. Usually, they are located right in your home or in

So, for complete removal, choose the Complete removal option and click on the Apply button.

Synaptic will show you a summary of what is going to be done. In my example, you can see many programs will be unchanged and only GIMP will be removed. After you click apply, GIMP will be uninstalled.

4. Using the terminal

Similarly to Synaptic way shown above, you have two options to remove software in Linux Mint using the terminal. Moreover, as you will see below, you can also remove orphan packages using the terminal.

Standard way

So, the most common and standard way is with this command:

And this will be equivalent to the simple remove option in Synaptic. That is it will remove the package but not its configuration files in /etc .

Completely remove (advanced)

However, if you want to completely remove the program you can use the command purge instead of remove .

And this will be equivalent to the Complete Removal in Synaptic — it will remove the package and the configuration files located in /etc .

Both the purge and remove commands will show you a summary of what is going to be removed. Read it carefully and confirm if you agree to remove listed packages. Be careful here because sometime purge may remove important programs as dependencies.

Remove orphan packages

Finally, using the terminal, you can also remove orphan packages using the following command.

And if you want to remove the GIMP configuration files from your home directory, you can also remove them from the command line.

Now all GIMP files are removed.

As you can see the command line way is even more advanced because you are given more flexibility and more options here. For example, we did not see any autoremove option before when we tried to remove through the Linux Mint menu, through the Software Manager, and in the Synaptic package manager.

Conclusion

In Linux, there are always different ways to do the same thing and it is nice because each of these options fits certain users. The different ways to uninstall software in Linux Mint proves it. Some are ideal for newbies whereas others are better for more powerful users.

If you know more ways to uninstall programs on Linux Mint, please leave a comment below.

If you liked this Linux Mint there, you can find how to configure it in this Linux Mint themes post. There are also a list of thing you can do after installing Linux Mint.

Источник

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.

Читайте также:  Chrome mac os во весь экран

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

Источник

Оцените статью