software

How to uninstall Java 9 on Mac

This evergreen explainer provides clear, actionable steps to uninstall Java 9 on macOS. You will learn how to remove the JDK or JRE safely, verify the removal, and clean residua...

Mara Ellison
How to uninstall Java 9 on Mac

What this guide covers

This evergreen explainer provides clear, actionable steps to uninstall Java 9 on macOS. You will learn how to remove the JDK or JRE safely, verify the removal, and clean residual files. These instructions apply to current and recent macOS versions and are useful for troubleshooting conflicts, freeing disk space, or switching Java versions. The process uses only built-in macOS tools and the terminal, so no extra downloads are required.

Understand Java 9 on macOS

Java 9 is a long-term support release introduced in 2017 that brought modularity and performance improvements. On macOS, Java can be installed as a JDK development kit, a JRE runtime, or via third-party installers, each affecting where files live on disk. Knowing where Java 9 is installed helps you remove the correct components and avoid leaving traces that could cause conflicts or confusion for other Java versions.

Typical install locations

  • /Library/Java/JavaVirtualMachines/jdk-9.jdk
  • /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
  • ~/Library/Java/JavaVirtualMachines/ (user-level installs)

Check what you have installed

Before uninstalling, confirm that Java 9 is present and identify how it was installed. This prevents accidental removal of a different Java version and helps you verify the uninstall later.

List Java installations

Open Terminal and run the following to list JDKs recognized by the system:

/usr/libexec/java_home -V

Review the output for a line containing jdk-9. Note the path shown; it is needed for manual removal. Also check the Java Control Panel in System Preferences or the presence of JavaAppletPlugin.plugin in Internet Plug-Ins.

Uninstall Java 9 manually

Follow these steps in order to safely remove Java 9 from your Mac. Use the path you confirmed in the previous section to target the correct installation.

Remove the JDK or JRE package

For most developer-oriented installs, remove the JDK by deleting its directory. In Terminal, run:

sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-9.jdk

For runtime-only installs or applet support, remove the plugin with:

sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin

Clean user-level leftovers

User-specific files may remain in ~/Library/Java, ~/Library/Preferences, and ~/Library/Application Support. Move these to the Trash if you want to keep them for diagnostic purposes, or delete them to fully purge Java 9. Typical locations include:

  • ~/Library/Java/JavaVirtualMachines/
  • ~/Library/Preferences/com.oracle.java.*
  • ~/Library/Application Support/Oracle/Java/

Alternative methods and package managers

If you used a package manager or third-party installer, use the same tool to remove Java 9. Examples include SDKMAN!, Homebrew, or manual DMG uninstallers provided by Oracle or vendors.

SDKMAN!

sdk uninstall java 9.0.x-amzn

Homebrew Cask

brew uninstall --cask java9

Check the exact cask name with brew search java; adjust the command if the name differs.

Verify the uninstall

After removing the files, confirm Java 9 is gone and ensure other Java versions still work.

Verify Java 9 removal

Run the same command used earlier to list Java installations:

/usr/libexec/java_home -V

Confirm that jdk-9 no longer appears. Then run java -version to check the active version; it should show a remaining Java 8, 11, or newer runtime, not Java 9.

Optional cleanup of PATH and JAVA_HOME

Check shell configuration files such as ~/.zshrc, ~/.bash_profile, or ~/.bashrc for JAVA_HOME entries or PATH references to the old JDK. Remove or update any lines pointing to the now-deleted paths to prevent errors in scripts or tools that rely on JAVA_HOME.

Troubleshooting and next steps

If commands fail, ensure you prefix with sudo when required and that the path matches exactly. If you accidentally removed the wrong JDK, restore it from Time Machine if you have backups, or reinstall the desired Java version from the official vendor. When finished, consider managing multiple Java versions with environment variables or tools like SDKMAN! to avoid future conflicts.

Quick reference: uninstall checklist

Step Command or action Purpose
1 /usr/libexec/java_home -V Confirm Java 9 installation path
2 sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-9.jdk Remove JDK
3 sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin Remove browser plugin (if present)
4 rm -rf ~/Library/Java/* (optional) Clean user-level leftovers
5 /usr/libexec/java_home -V && java -version Verify removal and active version

Wrap-up

By following these steps, you can completely uninstall Java 9 on macOS while preserving other Java versions and system stability. Use the checklist to confirm removal and audit your shell configuration for leftover references. If you manage multiple Java versions, adopting a version manager helps keep your environment predictable and easier to maintain over time.

Related Reading

More pages in this topic cluster.

How to Migrate Data From One Mac to Another: A Verified Step-by-Step Guide

Migrating data from one Mac to another is usually straightforward if you plan the workflow and choose the right transfer method. This guide explains the most reliable options—...

Read next
Pixel Drawing Software: A Comprehensive Guide to Tools, Techniques, and Best Practices

Pixel drawing software enables artists and designers to create detailed graphics at the pixel level, offering precise control over color, shape, and texture. These tools are fou...

Read next
Car Service Reminder App: How It Works and Why It Matters

A car service reminder app is a digital tool that tracks maintenance intervals, stores records, and prompts you when service is due. Instead of relying on paper receipts or memo...

Read next