Score:0

Not able to uninstall Java 17. Getting error related to dependency

ph flag

I am new to ubuntu and using Ubuntu 20.04.3 LTS. I had installed Java 17 recently but now I want to uninstall it but getting following dependency error. Please help me out:

dpkg-query -W -f='${binary:Package}\n' | grep -E -e '^(ia32-)?(sun|oracle)-java' -e '^openjdk-' -e '^icedtea' -e '^(default|gcj)-j(re|dk)' -e '^gcj-(.*)-j(re|dk)' -e '^java-common' | xargs sudo apt-get -y remove
[sudo] password for saurabh: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 jdk-17 : Depends: libc6-i386 but it is not installed
          Depends: libc6-x32 but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
in flag
Have you followed the suggestion to try `sudo apt --fix-broken install`?
Saurabh avatar
ph flag
Thanks. It worked today. Yesterday I tried but it was throwing this above error. Maybe I might have tried again in the new terminal.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.