“sudo apt-get remove hadoop” is not removing package

I am trying to uninstall Cloudera Hadoop from my Ubuntu System. For this I tried sudo apt-get remove hadoop command but this command is failing with following message:

ubuntu@ip-10-82-19-71:~/cluster-deployer/src$ sudo apt-get remove hadoop
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package hadoop is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 hadoop-hdfs-datanode : Depends: hadoop-hdfs (= 2.5.0+cdh5.3.0+781-1.cdh5.3.0.p0.54~precise-cdh5.3.0) but it is not going to be installed
 hadoop-hdfs-namenode : Depends: hadoop-hdfs (= 2.5.0+cdh5.3.0+781-1.cdh5.3.0.p0.54~precise-cdh5.3.0) but it is not going to be installed
 hadoop-yarn-nodemanager : Depends: hadoop-yarn (= 2.5.0+cdh5.3.0+781-1.cdh5.3.0.p0.54~precise-cdh5.3.0) but it is not going to be installed
 hadoop-yarn-resourcemanager : Depends: hadoop-yarn (= 2.5.0+cdh5.3.0+781-1.cdh5.3.0.p0.54~precise-cdh5.3.0) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Initially this command was not working so I killed one yarn process usking kill -9 <pid> and then executed above command but now I am not able to uninstall anything nor I am able to remove anything 🙁

What should I do next?

Answer

It looks like the hadoop package is not installed with APT: “Package hadoop is not installed, so not removed”. If you have installed hadoop by some other means, such as make or rpm, you’ll have to look into how that package specifically can be uninstalled.

Attribution
Source : Link , Question Author : Shekhar , Answer Author : l0b0

Leave a Comment