在 CentOS 上卸载 LibreOffice(你可能打错成 liboffice),可以按下面步骤操作:
rpm -qa | grep libreoffice
sudo yum remove libreoffice*
或(CentOS 8+/使用 dnf):
sudo dnf remove libreoffice*
系统会提示确认,输入 y 即可。
先列出:
rpm -qa | grep libreoffice
然后逐个卸载(示例):
sudo rpm -e libreoffice-core-xxx
sudo rpm -e libreoffice-writer-xxx
或直接批量:
sudo rpm -e $(rpm -qa | grep libreoffice)
rm -rf ~/.config/libreoffice
which libreoffice
无输出即表示已卸载。
如果你告诉我 CentOS 版本(如 7 / 8 / Stream) 和 安装方式(yum / 官网 rpm / 源码),我可以给你更精确的命令。