Merge pull request #26571 from geekpi/translating

translated
This commit is contained in:
geekpi 2022-07-25 08:28:28 +08:00 committed by GitHub
commit a8d180be12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 130 additions and 132 deletions

View File

@ -1,132 +0,0 @@
[#]: subject: "How to Uninstall Deb Packages in Ubuntu"
[#]: via: "https://itsfoss.com/uninstall-deb-ubuntu/"
[#]: author: "Abhishek Prakash https://itsfoss.com/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Uninstall Deb Packages in Ubuntu
======
Installing applications from a deb file is quite simple. You double click on it and it opens in the Software Center application and you install it from there.
[Installing applications from a deb file][1] is quite simple. You double click on it and it opens in the Software Center application and you install it from there.
But what about uninstalling a .deb package in Ubuntu or Debian? How do you remove the package you installed some time back.
While there are several ifs and buts around it, the simplest and most reliable way of deleting a deb file is by using the apt remove command.
```
sudo apt remove program_name
```
As you can see, **you need to know the exact package name here**. This may not always be straightforward. For example, if you install Google Chrome on Ubuntu, the program is known as google-chrome-stable in the command line. Did you already know that? I guess not.
In this tutorial, Ill go into detail about finding the exact package name and then using it to remove the application. Ill also discuss using a graphical method for deleting .deb packages.
### Removing package installed via deb files from Ubuntu
Before I show you how to remove deb packages from the command line, lets just quickly look at it in the Software Center application.
#### Method 1: Check if the application can be removed from the software center
Ubuntu has the Software Center GUI application that allows to search for applications, install them and remove them.
The Software Center may not show the application installed when you search for it.
![Searching for installed applications may not show any results in Ubuntu Software Center][2]
However, you may still find it under the “Installed” section if you scroll down. The external applications are usually displayed without their logo.
![Some installed applications can be found in the installed tab of the Software Center][3]
If you find it, you can remove the application by clicking the trash icon or remove button.
![Removing applications from the Ubuntu software center][4]
**Bottom line: Check if the application can be removed from the software center.**
#### Method 2: Delete applications using apt command
I am presuming that you dont know the exact name of the application command. It is only natural that you may not know that Google Chrome is installed as google-chrome-stable and Edge is installed as microsoft-edge-stable.
The tab completion may help if you have the first few letters. Otherwise, you can [list the installed applications with apt command][5] and use grep to search for the application name:
```
apt list --installed | grep -i possible_package_name
```
For example, you can intelligently guess that the Google Chrome package should have chrome in its name. You may search it like this:
```
apt list --installed | grep -i chrome
```
You may get more than one result in some cases.
![check if google chrome installed in ubuntu][6]
If you are not sure what the packages do, you can always get their details with:
```
apt info exact_package_name
```
Once you have the exact package name, you can delete it using the apt remove command.
```
sudo apt remove exact_package_name
```
You can also use apt-get remove or dpkg uninstall commands.
![Removing applications installed via deb files using the apt command][7]
#### Method 3: Use Synaptic Package Manager to remove deb applications
Another method is to use the [Synaptic Package Manager][8]. Before GNOME created its graphical package manager in the form of the Software Center, Synaptic was the default GUI package manager in Ubuntu and many other distributions.
It is still the recommended tool on the [Xfce desktop environment][9].
Install it first:
```
sudo apt install synaptic
```
Open Synaptic and search for the package name. Look for the installed packages that are marked green. Right-click on them and click on mark for removal. Hit apply after that.
![Removing Deb packages using Synaptic package manager][10]
### Did it help you?
I am more than comfortable using the apt command to remove the packages installed from .deb files. But I can understand that not everyone is comfortable using the command line.
I find the Software Center lacking when it comes to the removal of applications installed from external deb files. It could do a better job here.
I hope you have a better understanding of removing deb packages now. Let me know if you have any questions.
--------------------------------------------------------------------------------
via: https://itsfoss.com/uninstall-deb-ubuntu/
作者:[Abhishek Prakash][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/install-deb-files-ubuntu/
[2]: https://itsfoss.com/wp-content/uploads/2022/07/search-for-installed-applications-ubuntu-software-center.png
[3]: https://itsfoss.com/wp-content/uploads/2022/07/installed-applications-in-ubuntu-software-center-scaled.webp
[4]: https://itsfoss.com/wp-content/uploads/2022/07/removing-applications-from-ubuntu-software-center-scaled.webp
[5]: https://itsfoss.com/list-installed-packages-ubuntu/
[6]: https://itsfoss.com/wp-content/uploads/2022/07/check-if-google-chrome-installed-in-Ubuntu.png
[7]: https://itsfoss.com/wp-content/uploads/2022/07/removing-deb-files-applications-ubuntu.png
[8]: https://itsfoss.com/synaptic-package-manager/
[9]: https://www.xfce.org/
[10]: https://itsfoss.com/wp-content/uploads/2022/07/removing-deb-files-using-synaptic-scaled.webp

View File

@ -0,0 +1,130 @@
[#]: subject: "How to Uninstall Deb Packages in Ubuntu"
[#]: via: "https://itsfoss.com/uninstall-deb-ubuntu/"
[#]: author: "Abhishek Prakash https://itsfoss.com/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
如何在 Ubuntu 中卸载 Deb 包
======
[从 deb 文件安装应用][1]非常简单。双击它,它会在软件中心中打开,然后从那里安装它。
但是如何在 Ubuntu 或 Debian 中卸载 .deb 包呢?你如何删除一段时间前安装的软件包。
虽然这有几个如果和但是,但删除 deb 文件的最简单和最可靠的方法是使用 apt remove 命令。
```
sudo apt remove program_name
```
如你所见,**你需要在这里知道确切的包名称**。这可能并不总是直截了当的。例如,如果你在 Ubuntu 上安装 Google Chrome则该程序在命令行中称为 “google-chrome-stable”。你已经知道了吗我猜不是。
在本教程中,我将详细介绍如何找到确切的包名称,然后使用它来删除应用。我还将讨论使用图形方法删除 .deb 包。
### 从 Ubuntu 中删除通过 deb 文件安装的软件包
在我向你展示如何从命令行删除 deb 包之前,让我们在软件中心应用中快速查看它。
#### 方法 1检查应用是否可以从软件中心移除
Ubuntu 有软件中心 GUI 应用,允许搜索、安装和删除应用。
搜索时,软件中心可能不会显示已安装的应用。
![Searching for installed applications may not show any results in Ubuntu Software Center][2]
但是,如果向下滚动,你仍可能在“已安装”部分下找到它。外部应用通常不带 logo 显示。
![Some installed applications can be found in the installed tab of the Software Center][3]
如果找到它,你可以通过单击垃圾桶图标或删除按钮来删除该应用。
![Removing applications from the Ubuntu software center][4]
**一句话:检查是否可以从软件中心删除应用。**
#### 方法 2使用 apt 命令删除应用
我假设你不知道应用命令的确切名称。你可能不知道 Google Chrome 安装为 google-chrome-stable 而 Edge 安装为 microsoft-edge-stable这是很自然的。
如果你有前几个字母,那么 tab 补全可能会有所帮助。否则,你可以[使用 apt 命令列出已安装的应用][5] 并使用 grep 搜索应用程序名称:
```
apt list --installed | grep -i possible_package_name
```
例如,你可以智能地猜测 Google Chrome 包的名称中应该包含 chrome。你可以这样搜索
```
apt list --installed | grep -i chrome
```
在某些情况下,你可能会得到多个结果。
![check if google chrome installed in ubuntu][6]
如果你不确定这些软件包的作用,你可以随时通过以下方式获取它们的详细信息:
```
apt info exact_package_name
```
获得确切的软件包名称后,你可以使用 apt remove 命令将其删除。
```
sudo apt remove exact_package_name
```
你还可以使用 apt-get remove 或 dpkg uninstall 命令。
![Removing applications installed via deb files using the apt command][7]
#### 方法 3使用 Synaptic 包管理器删除 deb 应用
另一种方法是使用 [Synaptic 包管理器][8]。在 GNOME 以软件中心的形式创建其图形包管理器之前Synaptic 是 Ubuntu 和许多其他发行版中的默认 GUI 包管理器。
它仍然是 [Xfce 桌面环境][9]上的推荐工具。
首先安装它:
```
sudo apt install synaptic
```
打开 Synaptic 并搜索包名称。查找标记为绿色的已安装软件包。右键单击它们,然后单击“标记为删除”。之后点击应用。
![Removing Deb packages using Synaptic package manager][10]
### 对你有帮助吗?
我非常乐意使用 apt 命令删除从 .deb 文件中安装的软件包。但我可以理解,并不是每个人都喜欢使用命令行。
在删除从外部 deb 文件安装的应用时,我发现软件中心中缺失。它可以在这里做得更好。
我希望你现在对删除 deb 包有更好的了解。如果你有任何问题,请告诉我。
--------------------------------------------------------------------------------
via: https://itsfoss.com/uninstall-deb-ubuntu/
作者:[Abhishek Prakash][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/
[b]: https://github.com/lkxed
[1]: https://itsfoss.com/install-deb-files-ubuntu/
[2]: https://itsfoss.com/wp-content/uploads/2022/07/search-for-installed-applications-ubuntu-software-center.png
[3]: https://itsfoss.com/wp-content/uploads/2022/07/installed-applications-in-ubuntu-software-center-scaled.webp
[4]: https://itsfoss.com/wp-content/uploads/2022/07/removing-applications-from-ubuntu-software-center-scaled.webp
[5]: https://itsfoss.com/list-installed-packages-ubuntu/
[6]: https://itsfoss.com/wp-content/uploads/2022/07/check-if-google-chrome-installed-in-Ubuntu.png
[7]: https://itsfoss.com/wp-content/uploads/2022/07/removing-deb-files-applications-ubuntu.png
[8]: https://itsfoss.com/synaptic-package-manager/
[9]: https://www.xfce.org/
[10]: https://itsfoss.com/wp-content/uploads/2022/07/removing-deb-files-using-synaptic-scaled.webp