Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

I've attempted to install sun-java-6 by following a method given in a site which asked me to add a repository and then sudo apt-get install sun-java6-jre. while installing on terminal i cant click anything to accept the license so i exited terminal.

I restored the repository file to its default because when i try installing anything it automatically leading me to the sun-java6-jre installation and then the license agreement.

Now when i try to install anything i get the following error: E: The package sun-java6-jre needs to be reinstalled, but I can't find an archive for it.

What should i do..?? How can i fix this sun-java6 problem.

Even apt-get install -f is giving the above error.

Million Thanks in advance :)

share|improve this question
please add what site, what instructions you used to install, what version of ubuntu you are using. Thanks. – fossfreedom May 21 '13 at 22:54
/*Solved*/ I followed… and then luckily this time dpkg --remove --force-remove-reinstreq sun-java6-jre worked.!! – user160691 May 23 '13 at 11:35

/Solved/ I followed and then luckily this time dpkg --remove --force-remove-reinstreq sun-java6-jre worked.!!

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.