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 remove or apt-get purge

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 1

$ sudo yum remove sqoop

Sqoop 2

$ sudo yum remove sqoop2-server sqoop2-client

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-cdh<n>

HttpFS

$ sudo yum remove hadoop-httpfs

Hadoop core packages

$ sudo yum remove hadoop

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 remove removes all your configuration data as well as the package files.

The apt-get remove commands to uninstall the Hadoop components from a Debian or Ubuntu system are:

Component to remove

Command

Whirr

$ sudo apt-get remove whirr

Hue

$ sudo apt-get remove hue

Pig

$ sudo apt-get remove pig

Sqoop 1

$ sudo apt-get remove sqoop

Sqoop 2

$ sudo apt-get remove sqoop2-server sqoop2-client

Flume

$ sudo apt-get remove flume

Oozie client

$ sudo apt-get remove oozie-client

Oozie server

$ sudo apt-get remove oozie

Hive

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

HBase

$ sudo apt-get remove hadoop-hbase

ZooKeeper server

$ sudo apt-get remove hadoop-zookeeper-server

ZooKeeper client

$ sudo apt-get remove hadoop-zookeeper

ZooKeeper Failover Controller (ZKFC)

$ sudo apt-get remove hadoop-hdfs-zkfc

HDFS HA Journal Node

$ apt-get remove hadoop-hdfs-hadoop-hdfs-journalnode

HttpFS

$ sudo apt-get remove hadoop-httpfs

Hadoop repository packages

$ sudo apt-get remove cdh<n>-repository

Hadoop core packages

$ sudo apt-get remove hadoop

Uninstalling from SLES

Component removed

Command

Whirr

$ sudo zypper remove whirr

Hue

$ sudo zypper remove hue

Pig

$ sudo zypper remove pig

Sqoop

$ sudo zypper remove sqoop

Sqoop

$ sudo zypper remove sqoop2-server sqoop2-client

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

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