Apt how to uninstall
Apt how to uninstall
Как удалить программные пакеты в Ubuntu
How to Uninstall Software Packages on Ubuntu
Иногда вы можете установить приложение на Ubuntu, и, попробовав его, вы решаете, что это приложение не для вас. В этом случае вы, вероятно, захотите удалить пакет.
Только пользователь root или пользователь с sudo привилегиями может удалить пакеты из Ubuntu.
Удаление пакетов с помощью Ubuntu Software Center
Если командная строка не для вас, вы можете удалить приложения через Ubuntu Software Center (USC). Эта утилита предоставляет графический интерфейс для поиска, установки и удаления приложений.
На экране «Действия» найдите «Ubuntu Software» и нажмите на оранжевый значок USC. Это откроет инструмент USC.
Чтобы получить список всех установленных приложений, нажмите на вкладку «Установлено» в верхней панели навигации.
Прокрутите вниз, пока не найдете приложение, которое хотите удалить, и нажмите кнопку «Удалить» рядом с ним.
Инструмент Ubuntu Software показывает только установленные приложения с графическим интерфейсом пользователя (GUI). Если вы не можете найти пакет, который хотите удалить, вы должны удалить пакет из командной строки.
Удаление пакетов с помощью командной строки
Все, что вы можете сделать с помощью инструментов GUI, вы можете сделать из командной строки. На самом деле, командная строка дает вам больше возможностей и контроля для удаления пакетов программного обеспечения.
Вы можете открыть свой терминал, используя Ctrl+Alt+T сочетание клавиш или нажав на значок терминала.
Перед удалением пакета программного обеспечения вы должны сначала найти точное имя пакета. Чтобы получить список всех установленных пакетов в вашей системе, наберите:
Команда выведет длинный список установленных пакетов. Это может быть хорошей идеей направить вывод, чтобы less было легче читать. Или вы можете использовать grep для фильтрации результатов.
В дистрибутивах Ubuntu, Debian и связанных с ними Linux вы можете устанавливать, обновлять, удалять и иным образом управлять пакетами программного обеспечения с помощью утилит apt и apt-get командной строки. Синтаксис обеих команд идентичен.
Чтобы удалить установленный пакет, выполните следующую команду:
Замените package_name название пакета, который вы хотите удалить.
Вы также можете удалить несколько пакетов. Имена пакетов должны быть разделены пробелом:
Команда remove удаляет указанные пакеты, но может оставить некоторые файлы пакетов позади. Если вы хотите удалить пакет, включая все его файлы, используйте purge вместо remove :
Удалить Snap Packages
Для просмотра списка всех установленных пакетов моментальных снимков выполните следующую команду:
Как только вы знаете точное имя пакета, вы можете удалить его, набрав:
Удалить неиспользуемые пакеты
Всякий раз, когда вы устанавливаете новый пакет, который зависит от других пакетов, будут также установлены зависимости пакета. Когда пакет будет удален, зависимые пакеты останутся в системе. Эти оставшиеся пакеты больше не используются чем-либо еще и могут быть удалены.
Вы можете удалить ненужные пакеты с помощью:
Вывод
Мы показали вам, как удалять приложения из вашего Ubuntu через командную строку и с помощью Ubuntu Software Center. Умение удалять пакеты является неотъемлемой частью системного администрирования Linux.
Есть ряд причин, по которым вы захотите удалить ранее установленный пакет из вашей Ubuntu. Например, вам может потребоваться удалить приложение, которое вам больше не нужно, или освободить место на диске.
How to Uninstall or Remove Software Packages From Ubuntu
Home » DevOps and Development » How to Uninstall or Remove Software Packages From Ubuntu
This tutorial will walk you through several methods for removing software packages from an Ubuntu Linux system. We detail removal options using the GUI (graphical user interface) built in to the Ubuntu Software Center and using the command line.
7 Ways to Uninstall Ubuntu Packages
Remove With Ubuntu Software Manager
If you run Ubuntu with the default graphical interface, you may be familiar with the default software manager. This graphical tool gives a list of available and installed programs. Launch it by clicking the Ubuntu Software Center icon.
Once the utility loads, there are three tabs across the top:
Click the Installed tab. Scroll down the list of programs, then click the Remove button next to the program to uninstall.
Use the Synaptic Package Manager
The default Ubuntu Software Center may not display every application on your system. The Synaptic Package Manager is a more robust application. The Synaptic Package Manager is included by default in some versions of Ubuntu. Use the search bar to find and launch it on your system.
If your system does not include Synaptic Package Manager, use the Ubuntu Software Center to install it.
Once the Synaptic Package Manager loads, use the menu on the left to select Status > Installed. This lists all applications on your system.
To remove an application, highlight it > right-click > select Mark for Removal and then click Apply. This will uninstall the software, but leave the configuration files intact.
To delete the standard configuration files along with the software package, select Mark for Complete Removal instead.
How to Remove Package on Ubuntu From Command Line
Dpkg (Debian Package) is a standard package manager in many versions of Linux. To uninstall a package with the dpkg command, you need to know the exact name of the package you intend to uninstall.
To list installed packages in Ubuntu, enter the following into a terminal window:
This command lists all the software, but the list may be too long and not helpful.
To make a list easier to browse add the following:
If you know the name of the package you want to remove, you can search for it instead:
Replace package_name with the term you are searching for.
If you don’t know the full name, specify part of a name by surrounding it with asterisks (*), as follows:
We suggest copying the exact software package name (right click and copy) for use later on in the removal process.
Note: Using dpkg to remove software packages is not recommended. The recommended option is to use a package manager that will remove all dependencies. For example, dpkg may remove the specified package, but all of its dependencies will remain on the system and may no longer function correctly.
Apt-Get Remove Command
To remove a specific package, use the apt-get remove command:
This command prompts apt to scan through the installed applications and attempt to remove or repair any that are broken.
Apt-Get Purge Command
Replace package_name with the actual package name generated by apt or dpkg.
The remove command only deletes the software, not the configuration files.
To remove the program and config files, use the purge command:
Clean Command
The apt package manager can also clean up your system.
To delete the cache of old/outdated packages, enter:
Some programs are installed with dependencies. These are other software packages the program needs to run. It’s possible to uninstall an application, and still have all its dependencies on your system.
This command prompts apt to scan through the installed applications and attempt to remove or repair any that are broken.
AutoRemove Command
The apt package manager can remove orphaned or unnecessary dependencies with autoremove :
If you have any failed installations, broken dependencies, or corrupted package files, apt can try to repair them with the command:
This command prompts apt to scan through the installed applications and attempt to remove or repair any that are broken.
Now you should have a good understanding of several ways to find and remove packages on Ubuntu Linux.
How to Uninstall Software in Ubuntu 18.04
Introduction
In this tutorial, we will demonstrate how to quickly and easily uninstall software from Ubuntu. Uninstalling software can be done using several techniques. In this article, we will show you how to uninstall software using these various methods.
On Ubuntu, the main applications or methods used to install software packages are seen below.В
Each of these methods have specific methods to uninstall software.
In preparation for uninstalling software from Ubuntu, we will need sudo permissions. By accessing the sudo permissions level, before running commands, you can avoid having to authenticate these root-level commands each time.В В
Apt Uninstall
Different Operating Systems use various commands to execute actions. To interact with the packages on Ubuntu, you will typically want to use the apt command. You will see this command used numerous times in the instructions below. Let’s get started!
Find Installed Software
If you have an idea of what you want to uninstall, but you don’t know the exact name, see our article about finding out exact package names in Linux. You can also use the apt or dpkg command to see a list of all installed packages on your computer, press “Ctrl + Alt + T” to open a Terminal window. Type one the following command at the prompt and press “Enter”.
Scroll through the list of installed packages in the Terminal window to find the one you want to uninstall. Note the full name of the package. Then, type in one of the following commands.
These commands are useful for specific situations.
This command removes the aptitude cache located in /var/cache/apt/archives. When we install a program, the package file is downloaded and stored in that directory. The thing is, we do not need to keep the data in that directory. However, the only drawback of deleting that information is that if we decide to re-install any of those programs again, the packages would have to be downloaded again.
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 command will list all the obsolete and unused packages and any leftover dependencies taking up valuable space on your system. The system will also prompt with a y/n option to reconfirm the uninstallation procedure. When you click Y, the process will begin, and the unwanted software dependencies will be removed from your system.
This option uses the -f flag to examine the installed applications and will attempt to repair or remove any packages it finds that are broken.
Uninstall Using a PPA
To uninstall Software installed via PPA, we can use the following two commands.
The first command removes the software installed via the PPA. The second command removes the PPA from sources.list.
Top
Synaptic Uninstall
Synaptic is the GUI package manager for Ubuntu and is not usually installed on the server version of Ubuntu. We include it here to provide a more complete overview of uninstall methods. To uninstall software using synaptic, we would open Synaptic, scroll through the list of installed applications,В click on the software to highlight it, then right-clickВ and selectВ Mark for Removal,В and finally clickВ Apply. This will uninstall the software, but leave the configuration files intact. To delete the associated configuration files along with the software, selectВ Mark for Complete RemovalВ instead.
Top
DPKG Uninstall
To list software installed via dpkg, use one of these commands.
If you know the name of the software, we can search for the command using the less command. If we do not know the full name, we can also search for a partial name.
Before uninstalling a software package, it is a good practice to note the entire software name for accuracy. Run the following command and note the name of the software or application.
Как удалить пакет Ubuntu
Установка и удаление программ одна из самых важных вещей для пользователя компьютера. Поскольку нам нужно как нибудь получать новые, нужные программы, а также удалять лишние. Но удаление пакетов в Ubuntu имеет некоторые тонкости. После удаления могут остаться зависимости, пакеты установленные, как рекомендованные, а также конфигурационные файлы.
В этой статье мы разберем как удалить deb пакет Ubuntu, при чем удалить чисто, так, чтобы после него не осталось следов в системе. Также поговорим о полном удалении PPA, поскольку много пакетов, которых нет в официальных репозиториях мы устанавливаем из PPA.
Как удалить пакет Ubuntu
Самый простой способ удалить пакет Ubuntu, это воспользоватся одной из графических утилит, поставляемых специально для этого, например Synaptic или Центр приложений Ubuntu. По сути это делается в пару кликов. Сначала рассмотрим порядок действий в Центре приложений Ubuntu.
Запустить центр приложений вы можете из панели значков Unity:
Список всех установленных пакетов находится на вкладке Установлено, здесь приложения рассортированы по категориям:
Чтобы удалить пакет Ubuntu, достаточно кликнуть по нему левой кнопкой мыши, и когда появляться доступные действия нажать кнопку Удалить:
Для завершения нужно будет подтвердить удаление и ввести пароль.
Пакет удален, но не совсем так, как нам хотелось бы. Но об этом позже.
Дальше рассмотрим пакетный менеджер Synaptic. Это как ни как стороннее программное обеспечение, но многие его используют из-за большого функционала и удобного интерфейса. Если программа еще не установлена, ее нужно установить с помощью центра приложений или выполнив в терминале:
sudo apt install synaptic
Запустить программу можно через терминал, выполнив команду:
Посмотреть установленные пакеты вы можете выбрав вкладку состояние, а затем выбрав Установленные:
Удалить deb ubuntu вы можете просто нажав правой кнопкой мыши и в контекстном меню на нужном пакете и выбрав отметить для удаления или отметить для полного удаления:
Программа покажет, какие еще пакеты будут удалены, это те пакеты, которые зависят от нашего пакета:
Теперь, чтобы завершить удаление, осталось нажать кнопку Применить:
Теперь программа покажет какие пакеты будут удалены. И пойдет процесс удаления:
Как удалить пакет Ubuntu в терминале
sudo apt remove имя_пакета
Будет выполнено полное удаление пакета, включая конфигурационные файлы и зависимости, только рекомендованные программы останутся. Если вы хотите использовать apt-get чтобы удалить deb ubuntu, то порядок действий немного другой. Для обычного удаления пакета выполните:
sudo apt-get remove имя_пакета
Для удаления пакета вместе с его конфигурационными файлами, выполните:
sudo apt-get purge имя_пакета
А чтобы, также удалить зависимости, установленные вместе с пакетом, нужно после одной из предыдущих команд выполнить:
sudo apt autoremove
Будут удаленны не только явно указанные зависимости, но и программы установленные как рекомендованные.
Ну с основами разобрались, теперь перейдем к более сложным ситуациям. Что если вы устанавливали программу из deb файла и теперь не знаете точно, как называется ее пакет, чтобы удалить?
Это очень просто узнать, например по исполняемому файлу, допустим исполняемый файл программы TimeShift находится по адресу /usr/bin/timeshift, теперь узнаем ее пакет:
Очень часто мы устанавливаем недостающее нам программное обеспечение из PPA, но не все эти пакеты нужны нам на протяжении долгого времени, а при обновлении системы, могут даже вызвать ошибки. Так как же удалить все пакеты установленные из PPA? Для этого есть специальная утилита: ppa-purge.
Если она еще не установлена, устанавливаем командой:
sudo apt install ppa-purge
Теперь, чтобы удалить все пакеты установленные из определенного ppa используйте:
Узнать список репозиториев можно в программе источники приложений:
Такой командой можно одним махом удалить пакеты ubuntu, установленные из ppa:
Если вы устанавливали приложение из исходных кодов, то удалить его намного сложнее, потому что оно не контролируется менеджером пакетов, и соответственно система не знает какие файлы ему принадлежат.
Но все же способ есть, обычно, разработчики в файле сценариев makefile, кроме цели install реализуют цель uninstall, которая дозволяет выполнить обратное действие.
Поэтому если у вас осталась папка с исходным кодом той программы можно просто перейти в нее и выполнить make uninstall чтобы удалить приложение Ubuntu:
cd /папка/с/исходниками
$ sudo make uninstall
Выводы
В этой статье мы рассмотрели все, что поможет вам удалить приложение Ubuntu. При чем удалить полностью, а не только файлы программы. Если у вас остались вопросы, пишите в комментариях.
How to Uninstall Software on Ubuntu
In this article, we will be discussing the various methods and techniques used to locate and uninstall the software from a Ubuntu/Debian based server. We will primarily be using the apt and dpkg commands on the command line.
Uninstalling Software Using Apt
Various operating systems utilize different commands for package management that are designed to install and uninstall software. To interact with these packages on Ubuntu, we typically want to use the apt or dpkg commands. You will see these available commands numerous times in the instructions below. Let’s get started!В
Locate the Software to Uninstall
Before removing the software, it’s also good practice to find and note the entire software title for accuracy. Run the following command and note the name of the software or application.В
Employing the ‘apt list’ command outputs a full listing of the installed software on the server. This output can be challenging to sort through due to the speed of the output. To remedy this, we will use the ‘less’ command to locate the software title more easily. This allows us to scroll through the titles, making identifying the software more accessible.
Using grep with the apt list command to narrow our search further makes locating installed software even more straightforward.
In this case, we searched for cowsay. In locating the software, Ubuntu cautions us not to utilize apt within a script due to some irregularities which can occur. We are not using apt in this manner so we can safely ignore this warning. As you can see, the output shows us the title, the version of Ubuntu, the software version, and other details about the application.
Uninstall the Software
Removing software or an application from Ubuntu is relatively simple. In this example, we will show you how to remove the «cowsay» software from Ubuntu.В
Remove and Purge Software
In some cases, configuration files can be left behind after an application is uninstalled. If you want to completely remove the software and any additional config files from your server, we can execute an ‘apt-get remove’ using the purge flag in the command.
Remove Dependencies
If you would like to remove any dependencies and libraries associated with the application, you can use the ‘apt-get autoremove’ cleanup command.
In this case, there were no specific dependencies that relate to the software. Still, the system did note an old kernel version and removed it and then updated the system with a newer kernel version automatically.В
Uninstalling Software Using dpkg
The second method we can employ to uninstall software is by using the dpkg command. dpkg can also be utilized to locate and remove installed software.
To choose from the full list of installed packages, we use the «-l» flag with dpkg to get a complete roster of software that is currently deployed on the server. We can also pipe the output of this command into ‘less’ to make searching for the software title easier.
To narrow our search even further, we can pipe the output of the dpkg-query command into a grep to locate the installed software.
Lastly, if we only know a part of the name of the software title we want to uninstall, we can use the grep command with the part of the name denoted within a pair of single quotes. This request will search the output of the dpkg-query and output a shortlist of available options like so:
That’s all there is to it! You now know multiple ways to locate and uninstall the software from a Ubuntu server.
We’d Love For You To Join Us!
In this time of rapid technological advancement, Liquid Web provides more than just the widest selection of hosting products and services. We devote our time, talent and experience to you. We define ourselves as the being The Most Helpful Humans In HostingВ® because we believe that the more you need technology to drive your business, the more you need expert, caring people to stand by your side.
Give us a call at 800.580.4985, or open a chat or ticket with us to speak with one of our knowledgeable Solutions Team or an experienced Hosting Advisors today to find out more!