首页 > 编程知识 正文

linux系统如何使用yum删除软件包,yum命令怎么软件

时间:2023-05-05 15:20:23 阅读:204017 作者:2498

yum卸载软件 不卸载依赖

yum is mainly used by rpm based distributions to manage operating system packages. yum have a lot of features but one of the most used feature is removing packages from operating system. In this tutorial we will look how to delete or remove packages with yum.

基于rpm的发行版主要使用yum来管理操作系统软件包。 yum有很多功能,但是最常用的功能之一是从操作系统中删除软件包。 在本教程中,我们将研究如何使用yum删除或删除软件包。

We need root privileges all uninstall operations. We will provide root privilege with sudo command.

我们需要root特权进行所有卸载操作。 我们将使用sudo命令提供root特权。

卸载程序包 (Uninstall Package)

We will start by removing single package from operating system. This command will run rpm command with required options. than remove related cache and info files. We will use remove option and the package name we want to remove. In this example we will remove package named tmux.

我们将从操作系统中删除单个软件包开始。 该命令将运行带有必需选项的rpm命令。 而不是删除相关的缓存和信息文件。 我们将使用remove选项和要删除的软件包名称。 在此示例中,我们将删除名为tmux软件包。

$ sudo yum remove tmux Uninstall Package 卸载程序包 卸载多个软件包(Uninstall Multiple Packages)

If we need remove multiple packages with yum what can we do. Nothing more than providing packages by delimiting with spaces. We can remove multiple packages just providing their names by separating their names with space.

如果我们需要用yum删除多个软件包,我们该怎么办。 只不过是用空格分隔来提供软件包。 我们可以通过使用空格分隔名称来删除多个仅提供名称的软件包。

$ sudo yum remove tmux wget unzip Uninstall Multiple Packages 卸载多个软件包 卸载软件包组(Uninstall Group of Packages)

Yum provides groups to make multiple package management easier. For example Desktop LXDE is provided as group name LXDE Desktop . If can uninstall group and their related packages with remove too. We will prefix group name with @ to specify provided name is group or add group before remove. In this example we will remove LXDE Desktop.

Yum提供了组,使多个软件包管理更加容易。 例如,桌面LXDE作为组名LXDE Desktop 。 如果可以卸载组及其与相关包remove了。 我们将在组名称前加上@前缀,以指定提供的名称是组或在删除前添加group 。 在此示例中,我们将删除LXDE Desktop 。

$ sudo yum remove @"LXDE Desktop"

Or we will add group before remove.

否则我们将在删除之前添加group 。

$ sudo yum group remove "LXDE Desktop" 使用`-y`自动删除以接受提示 (Automatically Remove with `-y` To Accept Prompt)

While removing some files we may prompted to answer whether we are sure to remove given package. We can automatically answer this question yes by providing -y .

在删除某些文件时,我们可能会提示您回答是否一定要删除给定的软件包。 我们可以通过提供-y来自动回答这个问题。

$ sudo yum remove tmux -y .u3c75c103bd21161a4e98c7c8db4e283f , .u3c75c103bd21161a4e98c7c8db4e283f .postImageUrl , .u3c75c103bd21161a4e98c7c8db4e283f .centered-text-area { min-height: 80px; position: relative; } .u3c75c103bd21161a4e98c7c8db4e283f , .u3c75c103bd21161a4e98c7c8db4e283f:hover , .u3c75c103bd21161a4e98c7c8db4e283f:visited , .u3c75c103bd21161a4e98c7c8db4e283f:active { border:0!important; } .u3c75c103bd21161a4e98c7c8db4e283f .clearfix:after { content: ""; display: table; clear: both; } .u3c75c103bd21161a4e98c7c8db4e283f { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .u3c75c103bd21161a4e98c7c8db4e283f:active , .u3c75c103bd21161a4e98c7c8db4e283f:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .u3c75c103bd21161a4e98c7c8db4e283f .centered-text-area { width: 100%; position: relative; } .u3c75c103bd21161a4e98c7c8db4e283f .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u3c75c103bd21161a4e98c7c8db4e283f .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u3c75c103bd21161a4e98c7c8db4e283f .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u3c75c103bd21161a4e98c7c8db4e283f:hover .ctaButton { background-color: #E67E22!important; } .u3c75c103bd21161a4e98c7c8db4e283f .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .u3c75c103bd21161a4e98c7c8db4e283f .u3c75c103bd21161a4e98c7c8db4e283f-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u3c75c103bd21161a4e98c7c8db4e283f:after { content: ""; display: block; clear: both; } LEARN MORE  What Is Hard Disk Drive (HDD)? .u3c75c103bd21161a4e98c7c8db4e283f , .u3c75c103bd21161a4e98c7c8db4e283f .postImageUrl , .u3c75c103bd21161a4e98c7c8db4e283f .centered-text-area { min-height: 80px; position: relative; } .u3c75c103bd21161a4e98c7c8db4e283f , .u3c75c103bd21161a4e98c7c8db4e283f:hover , .u3c75c103bd21161a4e98c7c8db4e283f:visited , .u3c75c103bd21161a4e98c7c8db4e283f:active { border:0!important; } .u3c75c103bd21161a4e98c7c8db4e283f .clearfix:after { content: ""; display: table; clear: both; } .u3c75c103bd21161a4e98c7c8db4e283f { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .u3c75c103bd21161a4e98c7c8db4e283f:active , .u3c75c103bd21161a4e98c7c8db4e283f:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .u3c75c103bd21161a4e98c7c8db4e283f .centered-text-area { width: 100%; position: relative; } .u3c75c103bd21161a4e98c7c8db4e283f .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u3c75c103bd21161a4e98c7c8db4e283f .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u3c75c103bd21161a4e98c7c8db4e283f .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u3c75c103bd21161a4e98c7c8db4e283f:hover .ctaButton { background-color: #E67E22!important; } .u3c75c103bd21161a4e98c7c8db4e283f .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .u3c75c103bd21161a4e98c7c8db4e283f .u3c75c103bd21161a4e98c7c8db4e283f-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u3c75c103bd21161a4e98c7c8db4e283f:after { content: ""; display: block; clear: both; } 了解更多什么是硬盘驱动器(HDD)?

翻译自: https://www.poftut.com/uninstall-delete-packages-yum-remove/

yum卸载软件 不卸载依赖

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。