Complete Uninstallation of ODP
In this document, we will guide you through the process of uninstalling Ambari, the robust platform for managing big data clusters, and completely uninstalling Acceldata's open-source data platform. Whether you are transitioning to a different solution or simply looking to clean up your environment, our step-by-step instructions will ensure a seamless removal process, allowing you to effectively manage your data infrastructure.
Stop all Services
To stop all services at once, perform the following:
- Navigate to your Ambari console.
- Click Services from the left navigation menu. A drop-down menu is displayed.
- Click
Stop All.

If all the services are not stopped successfully, you need to manually kill all the processes on all nodes by using the following command to list and then kill them.
ps -u hdfskill PIDHost Clean-Up with HostCleanup.py
Ambari provides a HostCleanup.py script to automate the removal of packages, users, directories, repositories, processes, and alternatives based on a host-check report. Below is the combined, easy-to-follow usage for ODP uninstallation.
Locate the Host-Check Report
When you perform a host check, the report is saved at the below location.
Navigation: In the Ambari UI, navigate to Hosts → select hosts → Host Actions → Check Host.
/var/lib/ambari-agent/data/hostcheck_custom_actions.resultThis JSON-like file lists all the ODP-related packages and files detected on the host.

Script Usage and Options
Usage: HostCleanup.py [options]Options: -h, --help Show help message and exit. -v, --verbose Increase output verbosity. -f FILE, --file=FILE Read host-check report from FILE. -o FILE, --out=FILE Write detailed log to FILE. -k SKIP, --skip=SKIP Comma-separated items to skip: packages,users,directories,repositories,processes,alternatives. -s, --silent Accept default prompts without confirmation.# By default, removes all items not listed in --skip.Example Commands
- Cleanup everything except user accounts.
python /usr/lib/ambari-agent/lib/ambari_agent/HostCleanup.py --silent --skip=users- Skip both users and ODP packages along with their dependencies.
python /usr/lib/ambari-agent/lib/ambari_agent/HostCleanup.py --silent --skip=users,packages- Verbose log to a file.
python /usr/lib/ambari-agent/lib/ambari_agent/HostCleanup.py -v --silentIf you have any other additional packages, you need to remove them manually.
Remove log folders on all nodes
To remove all log folders on all nodes, run the following commands:
rm -rf /var/log/hadoop rm -rf /var/log/hbaserm -rf /var/log/hadoop-mapreduce rm -rf /var/log/hadoop-yarn rm -rf /var/log/hiverm -rf /var/log/hive-hcatalogrm -rf /var/log/hive2 rm -rf /var/log/knox rm -rf /var/log/oozie rm -rf /var/log/solrrm -rf /var/log/impalarm -rf /var/log/zookeeperrm -rf /var/log/sparkrm -rf /var/log/spark2Remove Hadoop directories including HDFS data on all hosts
To remove Hadoop directories including HDFS data on all hosts, run the following commands:
rm -rf /hadooprm -rf /hdfs/hadooprm -rf /hdfs/lost+foundrm -rf /hdfs/varrm -rf /tmp/hadooprm -rf /usr/bin/hadooprm -rf /usr/odprm -rf /var/hadoopRemove configuration directories on all nodes
To remove the configuration directories on all nodes, run the following commands:
rm -rf /etc/hadooprm -rf /etc/hadoop-httpfsrm -rf /etc/hbaserm -rf /etc/hive2rm -rf /etc/hiverm -rf /etc/hive-hcatalogrm -rf /etc/hive_llaprm -rf /etc/impalarm -rf /etc/knoxrm -rf /etc/livy*rm -rf /etc/oozierm -rf /etc/phoenixrm -rf /etc/pigrm -rf /etc/ranger-adminrm -rf /etc/ranger-usersyncrm -rf /etc/spark2rm -rf /etc/tezrm -rf /etc/zookeeperrm -rf /etc/tez*unlink /etc/ranger/kms/confTo delete ODP related repositories, run the following commands:
rm -rf /etc/yum.repos.d/odp.reporm -rf /etc/yum.repos.d/ambari-odp-1.repoyum clean allRemove all library folders on cluster Host
To remove all library folders on cluster Host, run the following commands:
rm -rf /var/lib/hadoop-hdfsrm -rf /var/lib/hadoop-mapreducerm -rf /var/lib/hadoop-yarnrm -rf /var/lib/hive*rm -rf /var/lib/impalarm -rf /var/lib/spark*rm -rf /var/lib/knoxrm -rf /var/lib/livy3rm -rf /var/lib/ambari-infra-solr-clientTo clear out hue from usr/local , run the following command:
rm -rf /usr/local/hue*Remove PIDs on all Hosts
To remove PIDs on all hosts, run the following commands:
rm -rf /var/run/hadooprm -rf /var/run/hadoop-mapreducerm -rf /var/run/hadoop-yarnrm -rf /var/run/hadoop-yarn-hbaserm -rf /var/run/hbaserm -rf /var/run/hive*rm -rf /var/run/knoxrm -rf /var/run/impalarm -rf /var/run/livy3rm -rf /var/run/spark*rm -rf /var/run/ranger*rm -rf /var/run/oozierm -rf /var/run/zookeeperRemove symlinks on all clusters' hosts (from /usr/bin)
To remove symlinks on all clusters hosts from /user/bin, run the following commands:
cd /usr/binrm -rf /usr/bin/odp-selectunlink hbaseunlink hdfsunlink hiveunlink hiveserver2unlink beelineunlink kafkaunlink mapredunlink oozieunlink oozied.shunlink ranger-adminunlink ranger-admin-startunlink ranger-admin-stopunlink ranger-kmsunlink ranger-usersyncunlink ranger-usersync-startunlink ranger-usersync-stopunlink yarnunlink zookeeper-clientunlink zookeeper-serverunlink zookeeper-server-cleanup## use ls -l | grep odp to check for any undeleted symlinksRemove symlinks on all clusters' hosts (from /usr/odp/current)
To remove symlinks on all clusters' hosts from /usr/odp/current, run the following commands:
cd /usr/odp/currentrm -rf oozie-clientfor file in hadoop*; do unlink "$file"; donefor file in hbase*; do unlink "$file"; donefor file in hive*; do unlink "$file"; donefor file in livy*; do unlink "$file"; donefor file in oozie*; do unlink "$file"; donefor file in ranger*; do unlink "$file"; donefor file in yarn*; do unlink "$file"; donefor file in kafka*; do unlink "$file"; donefor file in knox*; do unlink "$file"; donefor file in spark*; do unlink "$file"; donefor file in tez*; do unlink "$file"; donefor file in zookeeper*; do unlink "$file"; donecd /usr/odp/3.2.2.0-2rm -rf /usr/odp/3.2.2.0-2rm -rf /usr/odp/To clear out the security conf & keytabs for the ODP components, run the following commands:
rm -rf /etc/security/limits.d/*rm -rf /etc/security/keytabs/To delete users, run the following commands:
userdel -r hbaseuserdel -r hcatuserdel -r hdfsuserdel -r hive2userdel -r kafkauserdel -r knoxuserdel -r mapreduserdel -r oozieuserdel -r rangeruserdel -r sparkuserdel -r sqoopuserdel -r tezuserdel -r yarnuserdel -r zookeeperRemove Existing Files
To delete more existing files and directories manually, find them and run the following command:
find / -type f \( -name "*beeline*" -o -name "*hadoop*" -o -name "*hbase*" -o -name "*hdfs*" -o -name "*odp*" -o -name "*hive*" -o -name "*hiveserver2*" -o -name "*kafka*" -o -name "*mapred*" -o -name "*oozie*" -o -name "*ranger*" -o -name "*sqoop*" -o -name "*yarn*" -o -name "*zookeeper*" \) | egrep -v "ambari|spool|jdk64|doc|share|repository|site-packages|locale|distutils"On completion of the above steps, ODP undergoes a thorough uninstallation, and the Hadoop cluster is effectively cleaned up.
Retain Ambari
To retain Ambari and only erase DB and its data, run the following commands:
ambari server stopambari-server reset## after this you'll have to recreate the ambari db in mysqlSet Up Fresh Ambari Database
To set up fresh Ambari database, run the following commands:
ambari-server setupambari-server startComplete Uninstallation of Ambari
- Stop and remove the ambari-server (on Ambari host) and ambari-agent (on all nodes), by running the following commands:
ambari-server stopambari-agent stopyum erase ambari-serveryum erase ambari-agent- Remove log folders on all nodes, by running the following commands:
rm -rf /var/log/ambari-agentrm -rf /var/log/ambari-server- Remove config folders on all nodes, by running the following commands:
rm -rf /etc/ambari-agentrm -rf /etc/ambari-serverDelete Ambari related repos, by running the following commands:
rm -rf /etc/yum.repos.d/ambari.repoyum clean all- Remove PIDs on all nodes, by running the following commands:
rm -rf /var/run/ambari-agentrm -rf /var/run/ambari-server- Remove library folders on all nodes, by running the following commands:
rm -rf /usr/lib/ambari-agentrm -rf /usr/lib/ambari-server-backupsrm -rf /var/lib/ambari-agentrm -rf /var/lib/ambari-serverTo delete users, run the following command:
userdel -r ambari-qa- Manually find and delete more existing files and directories, by running the following command:
find / -name *ambari*