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

相關內容