linux 卸载openJDK

linux 卸载openJDK

# 卸载 open jdk
echo "正在卸载open jdk 。。。"
open_jdk=`rpm -qa |  grep java`
rpm -e --nodeps $open_jdk
if [ $? -eq 0 ];
then
        echo "卸载open jdk 成功"
else
        package=`rpm -qa  java`
	if [ -n package ];
	then
		echo "open jdk 已卸载,什么都没做"
	else
		echo "卸载open jdk 失败" 
        	exit;
	fi
fi

posted @ 2021-03-15 12:43  努力就是魅力  阅读(355)  评论(0编辑  收藏  举报