yum卸载的时候要带上参数 "--nodeps"

今天通告的一个误操作,说DBA在生产上yum安装了一个MySQL,后面又觉得版本不合适,直接yum remove了,导致服务故障异常。

复盘是因为,yum remove的时候不单是把他安装的MySQL给卸载了,还把MySQL涉及到的依赖给卸载了。缺乏这些依赖,导致服务器上其他服务异常。

说明:

To remove a package and its dependencies using yum, you can use the "--nodeps" option. This will remove the specified package without removing any of its dependencies.

Here is an example of how to use the "--nodeps" option with yum:

yum remove <package_name> --nodeps

Replace "<package_name>" with the name of the package you want to remove.

It is important to note that removing dependencies can cause issues with other packages that rely on those dependencies. Therefore, it is generally recommended to only use the "--nodeps" option if you are certain that the dependencies are no longer needed and will not cause any issues.

 

=====================================================

rpm -e包名 --nodeps

posted @ 2023-03-28 14:30  Justtosee  阅读(271)  评论(0编辑  收藏  举报