Uninstall default-jdk












4















I'm on a fresh Ubuntu 18.04 install. I did a sudo apt-get install default-jdk. Result:



java --version
openjdk 10.0.2 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)


Now I did sudo apt-get purge default-jdk. Result:



java --version
openjdk 10.0.2 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)


Why is OpenJDK still there?










share|improve this question





























    4















    I'm on a fresh Ubuntu 18.04 install. I did a sudo apt-get install default-jdk. Result:



    java --version
    openjdk 10.0.2 2018-07-17
    OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
    OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)


    Now I did sudo apt-get purge default-jdk. Result:



    java --version
    openjdk 10.0.2 2018-07-17
    OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
    OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)


    Why is OpenJDK still there?










    share|improve this question



























      4












      4








      4


      1






      I'm on a fresh Ubuntu 18.04 install. I did a sudo apt-get install default-jdk. Result:



      java --version
      openjdk 10.0.2 2018-07-17
      OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
      OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)


      Now I did sudo apt-get purge default-jdk. Result:



      java --version
      openjdk 10.0.2 2018-07-17
      OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
      OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)


      Why is OpenJDK still there?










      share|improve this question
















      I'm on a fresh Ubuntu 18.04 install. I did a sudo apt-get install default-jdk. Result:



      java --version
      openjdk 10.0.2 2018-07-17
      OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
      OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)


      Now I did sudo apt-get purge default-jdk. Result:



      java --version
      openjdk 10.0.2 2018-07-17
      OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
      OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)


      Why is OpenJDK still there?







      apt uninstall openjdk






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 8 '18 at 4:20









      karel

      60.6k13132155




      60.6k13132155










      asked Sep 17 '18 at 13:51









      RobertRobert

      1212




      1212






















          1 Answer
          1






          active

          oldest

          votes


















          4














          default-jdk in 18.04 has the following description:



          Description: Standard Java or Java compatible Development Kit
          This dependency package points to the Java runtime, or Java compatible
          development kit recommended for this architecture, which is
          openjdk-11-jdk for amd64.


          The results of apt-cache depends default-jdk are as follows:



          default-jdk
          Depends: default-jre
          Depends: default-jdk-headless
          Depends: openjdk-11-jdk


          The results of apt-cache rdepends default-jdk show that openjdk-11-jdk does not depend on default-jdk. default-jdk points to a Java runtime or Java compatible development kit, but uninstalling default-jdk does not uninstall either of these packages.



          To remove the packages installed by default-jdk, run the following command:



          sudo apt remove openjdk-11-jre-headless openjdk-11-jre openjdk-11-jdk-headless openjdk-11-jdk  





          share|improve this answer


























          • Since default-jdk depends on openjdk-11-jdk, then wouldn't removing default-jdk followed by a sudo apt-get autoremove accomplish the same?

            – Android Dev
            Sep 17 '18 at 14:18













          • @AndroidDev I replied to your comment by editing my answer. My reply is in the 5th paragraph.

            – karel
            Sep 17 '18 at 14:31











          • After sudo apt-get install default-jdk I use apt list --installed | grep openj to see that the packages openjdk-11-jre-headless, openjdk-11-jre, openjdk-11-jdk-headless and openjdk-11-jdk are installed. I use apt list --installed | grep openj again after a sudo apt-get purge default-jdk to see that all 4 packages are still there. After sudo apt-get autoremove the 2 jdk packages are gone but the 2 jre packages are still there!

            – Robert
            Sep 17 '18 at 14:46











          • oh I should add that in the meantime I have done a sudo apt-get install openjdk-8-jdk (which has solved my actual problem which I haven't described). So maybe that's the reason why he keeps the jre11 packages despite an autoremove? Which would be weird because why would OpenJDK8 want to have those packages. Anyway, now I have both, default-jdk and openjdk-8-jdk. I switch between the two via sudo update-java-alternatives.

            – Robert
            Sep 17 '18 at 15:00












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1076027%2funinstall-default-jdk%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          default-jdk in 18.04 has the following description:



          Description: Standard Java or Java compatible Development Kit
          This dependency package points to the Java runtime, or Java compatible
          development kit recommended for this architecture, which is
          openjdk-11-jdk for amd64.


          The results of apt-cache depends default-jdk are as follows:



          default-jdk
          Depends: default-jre
          Depends: default-jdk-headless
          Depends: openjdk-11-jdk


          The results of apt-cache rdepends default-jdk show that openjdk-11-jdk does not depend on default-jdk. default-jdk points to a Java runtime or Java compatible development kit, but uninstalling default-jdk does not uninstall either of these packages.



          To remove the packages installed by default-jdk, run the following command:



          sudo apt remove openjdk-11-jre-headless openjdk-11-jre openjdk-11-jdk-headless openjdk-11-jdk  





          share|improve this answer


























          • Since default-jdk depends on openjdk-11-jdk, then wouldn't removing default-jdk followed by a sudo apt-get autoremove accomplish the same?

            – Android Dev
            Sep 17 '18 at 14:18













          • @AndroidDev I replied to your comment by editing my answer. My reply is in the 5th paragraph.

            – karel
            Sep 17 '18 at 14:31











          • After sudo apt-get install default-jdk I use apt list --installed | grep openj to see that the packages openjdk-11-jre-headless, openjdk-11-jre, openjdk-11-jdk-headless and openjdk-11-jdk are installed. I use apt list --installed | grep openj again after a sudo apt-get purge default-jdk to see that all 4 packages are still there. After sudo apt-get autoremove the 2 jdk packages are gone but the 2 jre packages are still there!

            – Robert
            Sep 17 '18 at 14:46











          • oh I should add that in the meantime I have done a sudo apt-get install openjdk-8-jdk (which has solved my actual problem which I haven't described). So maybe that's the reason why he keeps the jre11 packages despite an autoremove? Which would be weird because why would OpenJDK8 want to have those packages. Anyway, now I have both, default-jdk and openjdk-8-jdk. I switch between the two via sudo update-java-alternatives.

            – Robert
            Sep 17 '18 at 15:00
















          4














          default-jdk in 18.04 has the following description:



          Description: Standard Java or Java compatible Development Kit
          This dependency package points to the Java runtime, or Java compatible
          development kit recommended for this architecture, which is
          openjdk-11-jdk for amd64.


          The results of apt-cache depends default-jdk are as follows:



          default-jdk
          Depends: default-jre
          Depends: default-jdk-headless
          Depends: openjdk-11-jdk


          The results of apt-cache rdepends default-jdk show that openjdk-11-jdk does not depend on default-jdk. default-jdk points to a Java runtime or Java compatible development kit, but uninstalling default-jdk does not uninstall either of these packages.



          To remove the packages installed by default-jdk, run the following command:



          sudo apt remove openjdk-11-jre-headless openjdk-11-jre openjdk-11-jdk-headless openjdk-11-jdk  





          share|improve this answer


























          • Since default-jdk depends on openjdk-11-jdk, then wouldn't removing default-jdk followed by a sudo apt-get autoremove accomplish the same?

            – Android Dev
            Sep 17 '18 at 14:18













          • @AndroidDev I replied to your comment by editing my answer. My reply is in the 5th paragraph.

            – karel
            Sep 17 '18 at 14:31











          • After sudo apt-get install default-jdk I use apt list --installed | grep openj to see that the packages openjdk-11-jre-headless, openjdk-11-jre, openjdk-11-jdk-headless and openjdk-11-jdk are installed. I use apt list --installed | grep openj again after a sudo apt-get purge default-jdk to see that all 4 packages are still there. After sudo apt-get autoremove the 2 jdk packages are gone but the 2 jre packages are still there!

            – Robert
            Sep 17 '18 at 14:46











          • oh I should add that in the meantime I have done a sudo apt-get install openjdk-8-jdk (which has solved my actual problem which I haven't described). So maybe that's the reason why he keeps the jre11 packages despite an autoremove? Which would be weird because why would OpenJDK8 want to have those packages. Anyway, now I have both, default-jdk and openjdk-8-jdk. I switch between the two via sudo update-java-alternatives.

            – Robert
            Sep 17 '18 at 15:00














          4












          4








          4







          default-jdk in 18.04 has the following description:



          Description: Standard Java or Java compatible Development Kit
          This dependency package points to the Java runtime, or Java compatible
          development kit recommended for this architecture, which is
          openjdk-11-jdk for amd64.


          The results of apt-cache depends default-jdk are as follows:



          default-jdk
          Depends: default-jre
          Depends: default-jdk-headless
          Depends: openjdk-11-jdk


          The results of apt-cache rdepends default-jdk show that openjdk-11-jdk does not depend on default-jdk. default-jdk points to a Java runtime or Java compatible development kit, but uninstalling default-jdk does not uninstall either of these packages.



          To remove the packages installed by default-jdk, run the following command:



          sudo apt remove openjdk-11-jre-headless openjdk-11-jre openjdk-11-jdk-headless openjdk-11-jdk  





          share|improve this answer















          default-jdk in 18.04 has the following description:



          Description: Standard Java or Java compatible Development Kit
          This dependency package points to the Java runtime, or Java compatible
          development kit recommended for this architecture, which is
          openjdk-11-jdk for amd64.


          The results of apt-cache depends default-jdk are as follows:



          default-jdk
          Depends: default-jre
          Depends: default-jdk-headless
          Depends: openjdk-11-jdk


          The results of apt-cache rdepends default-jdk show that openjdk-11-jdk does not depend on default-jdk. default-jdk points to a Java runtime or Java compatible development kit, but uninstalling default-jdk does not uninstall either of these packages.



          To remove the packages installed by default-jdk, run the following command:



          sudo apt remove openjdk-11-jre-headless openjdk-11-jre openjdk-11-jdk-headless openjdk-11-jdk  






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Sep 17 '18 at 15:01

























          answered Sep 17 '18 at 13:56









          karelkarel

          60.6k13132155




          60.6k13132155













          • Since default-jdk depends on openjdk-11-jdk, then wouldn't removing default-jdk followed by a sudo apt-get autoremove accomplish the same?

            – Android Dev
            Sep 17 '18 at 14:18













          • @AndroidDev I replied to your comment by editing my answer. My reply is in the 5th paragraph.

            – karel
            Sep 17 '18 at 14:31











          • After sudo apt-get install default-jdk I use apt list --installed | grep openj to see that the packages openjdk-11-jre-headless, openjdk-11-jre, openjdk-11-jdk-headless and openjdk-11-jdk are installed. I use apt list --installed | grep openj again after a sudo apt-get purge default-jdk to see that all 4 packages are still there. After sudo apt-get autoremove the 2 jdk packages are gone but the 2 jre packages are still there!

            – Robert
            Sep 17 '18 at 14:46











          • oh I should add that in the meantime I have done a sudo apt-get install openjdk-8-jdk (which has solved my actual problem which I haven't described). So maybe that's the reason why he keeps the jre11 packages despite an autoremove? Which would be weird because why would OpenJDK8 want to have those packages. Anyway, now I have both, default-jdk and openjdk-8-jdk. I switch between the two via sudo update-java-alternatives.

            – Robert
            Sep 17 '18 at 15:00



















          • Since default-jdk depends on openjdk-11-jdk, then wouldn't removing default-jdk followed by a sudo apt-get autoremove accomplish the same?

            – Android Dev
            Sep 17 '18 at 14:18













          • @AndroidDev I replied to your comment by editing my answer. My reply is in the 5th paragraph.

            – karel
            Sep 17 '18 at 14:31











          • After sudo apt-get install default-jdk I use apt list --installed | grep openj to see that the packages openjdk-11-jre-headless, openjdk-11-jre, openjdk-11-jdk-headless and openjdk-11-jdk are installed. I use apt list --installed | grep openj again after a sudo apt-get purge default-jdk to see that all 4 packages are still there. After sudo apt-get autoremove the 2 jdk packages are gone but the 2 jre packages are still there!

            – Robert
            Sep 17 '18 at 14:46











          • oh I should add that in the meantime I have done a sudo apt-get install openjdk-8-jdk (which has solved my actual problem which I haven't described). So maybe that's the reason why he keeps the jre11 packages despite an autoremove? Which would be weird because why would OpenJDK8 want to have those packages. Anyway, now I have both, default-jdk and openjdk-8-jdk. I switch between the two via sudo update-java-alternatives.

            – Robert
            Sep 17 '18 at 15:00

















          Since default-jdk depends on openjdk-11-jdk, then wouldn't removing default-jdk followed by a sudo apt-get autoremove accomplish the same?

          – Android Dev
          Sep 17 '18 at 14:18







          Since default-jdk depends on openjdk-11-jdk, then wouldn't removing default-jdk followed by a sudo apt-get autoremove accomplish the same?

          – Android Dev
          Sep 17 '18 at 14:18















          @AndroidDev I replied to your comment by editing my answer. My reply is in the 5th paragraph.

          – karel
          Sep 17 '18 at 14:31





          @AndroidDev I replied to your comment by editing my answer. My reply is in the 5th paragraph.

          – karel
          Sep 17 '18 at 14:31













          After sudo apt-get install default-jdk I use apt list --installed | grep openj to see that the packages openjdk-11-jre-headless, openjdk-11-jre, openjdk-11-jdk-headless and openjdk-11-jdk are installed. I use apt list --installed | grep openj again after a sudo apt-get purge default-jdk to see that all 4 packages are still there. After sudo apt-get autoremove the 2 jdk packages are gone but the 2 jre packages are still there!

          – Robert
          Sep 17 '18 at 14:46





          After sudo apt-get install default-jdk I use apt list --installed | grep openj to see that the packages openjdk-11-jre-headless, openjdk-11-jre, openjdk-11-jdk-headless and openjdk-11-jdk are installed. I use apt list --installed | grep openj again after a sudo apt-get purge default-jdk to see that all 4 packages are still there. After sudo apt-get autoremove the 2 jdk packages are gone but the 2 jre packages are still there!

          – Robert
          Sep 17 '18 at 14:46













          oh I should add that in the meantime I have done a sudo apt-get install openjdk-8-jdk (which has solved my actual problem which I haven't described). So maybe that's the reason why he keeps the jre11 packages despite an autoremove? Which would be weird because why would OpenJDK8 want to have those packages. Anyway, now I have both, default-jdk and openjdk-8-jdk. I switch between the two via sudo update-java-alternatives.

          – Robert
          Sep 17 '18 at 15:00





          oh I should add that in the meantime I have done a sudo apt-get install openjdk-8-jdk (which has solved my actual problem which I haven't described). So maybe that's the reason why he keeps the jre11 packages despite an autoremove? Which would be weird because why would OpenJDK8 want to have those packages. Anyway, now I have both, default-jdk and openjdk-8-jdk. I switch between the two via sudo update-java-alternatives.

          – Robert
          Sep 17 '18 at 15:00


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1076027%2funinstall-default-jdk%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

          How to change which sound is reproduced for terminal bell?

          Can I use Tabulator js library in my java Spring + Thymeleaf project?