How to delete app linux

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.

Читайте также:  Как использовать активатор для windows 10 kms

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

Источник

Удаление программ 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:

Читайте также:  Сбой подключения с ошибкой 638 windows 10

sudo zypper remove firefox

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

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

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

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

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

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

sudo rm -Rf /opt/google-chrome/

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

Выводы

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

Источник

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 .

Читайте также:  Port command in linux

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.

Источник

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