使用YUM卸载
通过yum list xx 查询已安装的名为xx的包
yum list xx
根据返回结果,如返回结果为xxxx,使用sudo yum remove xxxx卸载
sudo yum remove xxxx
示例1:
如想更新Vscode版本,需要将旧版code卸载后,才能安装新版本。
[user@user ~]$ yum list code
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.bfsu.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Installed Packages
code.x86_64 1.52.1-1608137084.el7 installed
[user@user ~]$ sudo yum remove code.x86_64
使用RPM命令卸载
使用rpm -qa 查询rpm包名字
rpm -qa | grep name
rpm会返回含name的所有包,挑选其中想卸载的软件包,使用 rpm -e 卸载
rpm -e xxxx
示例1:
[user@user ~]$ rpm -qa | grep code
dmidecode-3.2-3.el7.x86_64
perl-Encode-Locale-1.03-5.el7.noarch
perl-Encode-2.51-7.el7.x86_64
code-1.52.1-1608137084.el7.x86_64
perl-Text-Unidecode-0.04-20.el7.noarch
microcode_ctl-2.1-53.7.el7_7.x86_64
[user@Iser ~]$ sudo rpm -e code-1.52.1-1608137084.el7.x86_64