Centos:如何恢复到软件包的早期版本?

Centos:如何恢复到软件包的早期版本?

我已经安装了 filebeat 6.4 版本,然后我决定恢复到 1.3 版本。因此,我使用命令“yum remove filebeat-6.4.0-x86_64.rpm”将其删除,当我尝试安装 filebeat 1.3 时,我收到错误:

package filebeat-6.4.0-1.x86_64 (which is newer than filebeat-1.3.1-1.x86_64) is already installed
file /etc/filebeat/filebeat.yml from install of filebeat-1.3.1-1.x86_64 conflicts with file from package filebeat-6.4.0-1.x86_64
file /etc/init.d/filebeat from install of filebeat-1.3.1-1.x86_64 conflicts with file from package filebeat-6.4.0-1.x86_64
file /usr/bin/filebeat from install of filebeat-1.3.1-1.x86_64 conflicts with file from package filebeat-6.4.0-1.x86_64
file /lib/systemd/system/filebeat.service from install of filebeat-1.3.1-1.x86_64 conflicts with file from package filebeat-6.4.0-1.x86_64

看起来配置文件没有被删除,所以我尝试删除错误消息中的路径以避免冲突,但我仍然收到相同的错误消息。我发现删除软件包的正确命令是使用“--remove-leaves”,所以我尝试重新安装版本 6.4,这样我就可以删除所有内容,当我尝试安装它时,它说“无需执行”,因为它检测到版本 6.4 已经安装,现在当我执行'yum remove *filebeat* --remove-leaves',,'No Match for argument: filebeat-6.4.0-x86_64.rpm'所以它什么也不做。我怎样才能干净地删除剩余的文件?

答案1

我尝试了以下顺序并且成功了:

yum reinstall filebeat-6.4.0-x86_64.rpm
yum remove filebeat --remove-leaves
yum install filebeat-1.3.1-x86_64.rpm

相关内容