Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I completely remove Java 6 and install Java/JDK 7 on Linux Mint 13?

share|improve this question
Are you using the GUI or the Terminal? – Kevdog777 Jul 17 '12 at 9:38
Already answered below. – Travis R Jul 19 '12 at 2:11
up vote 9 down vote accepted

Here's how it's done:

# Must install 7 first or else when uninstalling six, it will try to install a bunch of replacement gcj stuff.
sudo apt-get install openjdk-7-jdk
sudo apt-get remove openjdk-6-jre
sudo apt-get remove openjdk-6-jre-lib


> java -version
java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.