Last active
September 16, 2015 11:47
-
-
Save paladini/abef87cc757fa1f18a5a to your computer and use it in GitHub Desktop.
Removal script for Spark on the default image of Fedora 22. Will remove everything: Oracle JDK, Maven 3.3.3, Scala 2.10.5 and Spark 1.5.0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Remove Spark from Fedora 22. | |
# Written by Fernando Paladini on 09/15/2015. | |
# Removing Oracle JDK 8. | |
printf "\n\n[LOG] Removing Java on 'alternatives'\n\n" | |
sudo alternatives --remove java /usr/java/latest/jre/bin/java | |
sudo alternatives --remove javaws /usr/java/latest/jre/bin/javaws | |
sudo alternatives --remove javac /usr/java/latest/bin/javac | |
cd $HOME/iot | |
arch=$(uname -m) | |
if [ "$arch" == "x86_64" ] | |
then | |
printf "\n\n[LOG] x86_64 architecture detected. Removing Oracle JDK 8 for x86_64. \n\n" | |
sudo rpm -e jdk-8u60-linux-x64.rpm | |
else | |
printf "\n\n[LOG] i686 architecture detected. Removing Oracle JDK 8 for i586. \n\n" | |
sudo rpm -e jdk-8u60-linux-i586.rpm | |
fi | |
# Removing Scala | |
printf "\n\n[LOG] Removing Scala 2.10.5.\n\n" | |
sudo rpm -e scala-2.10.5.rpm | |
# Removing and configuring Maven | |
printf "\n\n[LOG] Removing Maven 3.3.3.\n\n" | |
sudo alternatives --remove mvn $HOME/apache-maven-3.3.3/bin/mvn | |
sudo rm -f /usr/bin/mvn 2> /dev/null | |
rm -rf apache-maven-3.3.3 | |
# Removing Spark | |
rm -rf spark-1.5.0 | |
rm spark-1.5.0.tgz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment