2017年5月23日 星期二

[Linux 常見問題] Linux yum command skip updating packages

Source From Here
Question
How can I skip any packages updating while using yum update command in CentOS / RedHat / RHEL / Fedora Linux server system?

How-To
yum command under RedHat / Centos has the -x or –exclude option. It will exclude a specific package by name or shell glob (* or ?) from updates on all repositories.

yum exclude package syntax
Use the following syntax ( you must login as the root user to use following commands):
# yum -x {package-name} update
# yum --exclude={package-name} update

For example, exclude httpd or kernel package from update, enter:
# yum -x httpd* update
# yum --exclude=kernel* update

Below will list available update related to docker and do updating without docker packages:
# yum check-update | grep docker // Check available update related to docker
docker.x86_64 2:1.12.6-16.el7.centos extras
docker-client.x86_64 2:1.12.6-16.el7.centos extras
docker-common.x86_64 2:1.12.6-16.el7.centos extras


# yum -y -x docker* update // Doing update without docker package(s)


沒有留言:

張貼留言

[Git 常見問題] error: The following untracked working tree files would be overwritten by merge

  Source From  Here 方案1: // x -----删除忽略文件已经对 git 来说不识别的文件 // d -----删除未被添加到 git 的路径中的文件 // f -----强制运行 #   git clean -d -fx 方案2: 今天在服务器上  gi...