Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Cloudera Employee

NOTE: This is for information and testing purposes only. Pleaes exercise caution prior to using it on business critical environments.

STEPS:

To completely remove HDP stack from the Operating System, do the following:

1. Stop all the services in Ambari UI.

2. Shutdown ambari-server and ambari-agent on Ambari server host using the following commands:

$ ambari-server stop
$ ambari-agent stop

3. Shutdown ambari-agent on all other nodes using the following commands:

$ ambari-agent stop

4. Run the following command to check the installed services to delete the related configs and directories:

$ hdp-select | grep -v 'None'

5. Follow this URLto uninstall each services that is installed as per the above step or from the Ambari UI.

6. Remove all the files and directory related with Hadoop and HDP using the following commands. This step will delete all the files and directories name with hadoop under root partition. Please be extra caution to run this step and make sure you have nothing important in these directories.

find / -name hadoop -type d | xargs rm -rf; rm -rf /usr/hdp
find / -name hadoop-* -type d | xargs rm -rf

7. Based on the services that are installed, delete old users like HDFS, YARN, MAPRED etc, using the following commands:

$ userdel -r hdfs
$ userdel -r yarn
$ userdel -r mapred

8. Similarly delete other users like hive, hbase, oozie, etc if these services are installed on the cluster.

9. If you want to reset the Ambari Database to remove the deleted cluster information then do the following:

  1. Take a backup of Ambari database to your backup location using the steps mentioned in this document.
  2. Reset the Ambari database using the following command from Ambari Server host:
$ ambari-server reset
4,123 Views
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎03-28-2017 11:13 PM
Updated by:
 
Contributors
Top Kudoed Authors