This is the documentation for CDH 4.7.1.
Documentation for other versions is available at Cloudera Documentation.

Uninstalling CDH Components

Before uninstalling CDH, stop all Hadoop processes, following the instructions in Stopping Services.

Here are the commands to use to uninstall the Hadoop components on different Linux systems.

Operating System

Commands

Comments

Red-Hat-compatible

yum remove

 

Debian and Ubuntu

apt-get purge or apt-get remove

apt-get can be run with the remove option to remove only the installed packages or with the purge option to remove packages and configuration

SLES

zypper remove

 

Uninstalling from Red Hat, CentOS, and Similar Systems

Component to remove

Command

Mahout

$ sudo yum remove mahout

Whirr

$ sudo yum remove whirr

Hue

$ sudo yum remove hue

Pig

$ sudo yum remove pig

Sqoop

$ sudo yum remove sqoop

Flume

$ sudo yum remove flume

Oozie client

$ sudo yum remove oozie-client

Oozie server

$ sudo yum remove oozie

Hive

$ sudo yum remove hive hive-metastore hive-server hive-server2

HBase

$ sudo yum remove hadoop-hbase

ZooKeeper server

$ sudo yum remove hadoop-zookeeper-server

ZooKeeper client

$ sudo yum remove hadoop-zookeeper

ZooKeeper Failover Controller (ZKFC)

$ sudo yum remove hadoop-hdfs-zkfc

HDFS HA Journal Node

$ sudo yum remove hadoop-hdfs-hadoop-hdfs-journalnode

Hadoop repository packages

$ sudo yum remove cloudera-cdh3

HttpFS

$ sudo yum remove hadoop-httpfs

Hadoop core packages

$ sudo yum remove hadoop-0.20

Uninstalling from Debian and Ubuntu

Use the apt-get command to uninstall software on Debian and Ubuntu systems. You can use apt-get remove or apt-get purge; the difference is that apt-get purge removes all your configuration data as well as the package files. If you are upgrading an Ubuntu or Debian system from CDH3u3 or earlier, you must use apt-get purge (rather than apt-get remove) to ensure that the re-install succeeds.

The purge commands to uninstall the Hadoop components from a Debian or Ubuntu system are:

Component to remove

Command

Mahout

$ sudo apt-get purge mahout

Whirr

$ sudo apt-get purge whirr

Hue

$ sudo apt-get purge hue

Pig

$ sudo apt-get purge pig

Sqoop

$ sudo apt-get purge sqoop

Flume

$ sudo apt-get remove flume

Oozie client

$ sudo apt-get purge oozie-client

Oozie server

$ sudo apt-get purge oozie

Hive

$ sudo apt-get purge hive hive-metastore hive-server hive-server2

HBase

$ sudo apt-get purge hadoop-hbase

ZooKeeper server

$ sudo apt-get purge hadoop-zookeeper-server

ZooKeeper client

$ sudo apt-get purge hadoop-zookeeper

ZooKeeper Failover Controller (ZKFC)

$ sudo apt-get purge hadoop-hdfs-zkfc

HDFS HA Journal Node

$ apt-get purge hadoop-hdfs-hadoop-hdfs-journalnode

HttpFS

$ sudo apt-get purge hadoop-httpfs

Hadoop repository packages

$ sudo apt-get remove cdh3-repository

Hadoop core packages

$ sudo apt-get purge hadoop-0.20

Uninstalling from SLES

Component removed

Command

Mahout

$ sudo zypper remove mahout

Whirr

$ sudo zypper remove whirr

Hue

$ sudo zypper remove hue

Pig

$ sudo zypper remove pig

Sqoop

$ sudo zypper remove sqoop

Flume

$ sudo zypper remove flume

Oozie server

$ sudo zypper remove oozie

Oozie client

$ sudo zypper remove oozie-client

Hive

$ sudo zypper remove hive hive-metastore hive-server hive-server2

HBase

$ sudo zypper remove hadoop-hbase

ZooKeeper server

$ sudo zypper remove hadoop-zookeeper-server

ZooKeeper client

$ sudo zypper remove hadoop-zookeeper

ZooKeeper Failover Controller (ZKFC)

$ sudo zypper remove hadoop-hdfs-zkfc

HDFS HA Journal Node

$ sudo zypper remove hadoop-hdfs-hadoop-hdfs-journalnode

HttpFS

$ sudo zypper remove hadoop-httpfs

Hadoop repository packages

$ sudo zypper remove cloudera-cdh

Hadoop core packages

$ sudo zypper remove hadoop-0.20

Additional clean-up

The uninstall commands may not remove all traces of Hadoop from your system. The apt-get purge commands available for Debian and Ubuntu systems delete more files than the commands that use the remove option but are still not comprehensive. If you want to remove all vestiges of Hadoop from your system, look for the following and remove them manually:

  • log files
  • modified system configuration files
  • Hadoop configuration files in directories under /etc such as hadoop, hbase, hue, hive, oozie, sqoop, zookeeper, and zookeeper.dist
  • user/group identifiers
  • Oozie and Hue databases
  • Documentation packages