//# 删除安装包
yum remove -y 'cloudera-manager-*' enterprise-debuginfo* oracle-j2sdk1.7
yum clean all
//# 卸载目录
umount cm_processes
//# 删除目录
rm -rf /usr/share/cmf /var/lib/cloudera /var/cache/yum/cloudera /var/log/cloudera /var/run/cloudera
//# 删除PostgreSQL 数据;注意有没有其他应用使用PostgreSQL库
yum remove -y postgres*
rm -rf /var/lib/cloudera-scm-server-db
//# 删除其他目录
rm -f /tmp/.scm_prepare_node.lock
rm -rf /var/lib/navigator /var/lib/solr /var/lib/zookeeper /var/lib/flume-ng /var/lib/hadoop /var/lib/hue /var/lib/oozie /var/lib/solr /var/lib/sqoop /var/lib/impala /var/lib/hbase /var/lib/hive /var/lib/kudu /var/lib/sentry /var/lib/spark /var/lib/hadoop-yarn /var/lib/pgsql
rm -rf /usr/lib/hadoop /usr/lib/hadoop /usr/lib/hive /usr/lib/hbase /usr/lib/oozie /usr/lib/sqoop /usr/lib/zookeeper /usr/lib/bigtop /usr/lib/flume-ng /usr/lib/hcatalog /usr/lib/hue
rm -rf /etc/hadoop /etc/zookeeper /etc/hive /etc/hue /etc/impala /etc/sqoop /etc/oozie /etc/hbase /etc/hcatalog /etc/cloudera-scm-agent /etc/cloudera-scm-server /etc/spark
//# 删除日志目录
rm -rf /var/log/cloudera-manager-installer
rm -rf /var/log/cloudera-scm-server
rm -rf /var/log/cloudera-scm-agent
rm -rf /var/log/{hadoop-hdfs,impalad,impala-minidumps}
//清空数据目录
rm -rf ${data_drive_path}/{dfs,mapred,yarn,impala,kudu}
rm -rf /opt/cloudera*