为什么yum 包可以列出但不能删除?

Why Yum package can be listed but not removed?

当我使用 sudo yum list | grep nvidia 列出包含 nvidia 的软件包时,我得到了这个列表:

libnvidia-container-devel.x86_64           1.3.0-1                libnvidia-container
libnvidia-container-static.x86_64          1.3.0-1                libnvidia-container
libnvidia-container-tools.x86_64           1.3.0-1                libnvidia-container
libnvidia-container1.x86_64                1.3.0-1                libnvidia-container
libnvidia-container1-debuginfo.x86_64      1.3.0-1                libnvidia-container
nvidia-container-runtime.x86_64            3.4.0-1                nvidia-container-runtime
nvidia-container-runtime-hook.x86_64       1.4.0-2                nvidia-container-runtime
nvidia-container-toolkit.x86_64            1.3.0-2                nvidia-container-runtime
nvidia-docker.x86_64                       1.0.1-1                nvidia-docker
nvidia-docker2.noarch                      2.5.0-1                nvidia-docker
nvidia-query-resource-opengl.x86_64        1.0.0-2.el7            epel
nvidia-query-resource-opengl-lib.x86_64    1.0.0-2.el7            epel
nvidia-texture-tools.x86_64                2.0.8-13.el7           epel
nvidia-texture-tools-devel.x86_64          2.0.8-13.el7           epel
pcp-pmda-nvidia-gpu.x86_64                 4.3.2-7.el7_8          updates

如您所见,有多个包含 nvidia 的软件包。我select一个,比如nvidia-docker。 然后我尝试使用 sudo yum remove nvidia-dockersudo yum remove nvidia-docker.x86_64 删除这个包,但它不起作用。

包没有被删除。如何删除这个包?

我的系统:

NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

yum list 列出所有 可用 包,而 yum list installed 仅列出 已安装 包。

所以你应该尝试命令 yum list installed | grep nvidia