sudo apt-get update && apt-get remove openjdk* code example Example: how to uninstall openjdk in linux sudo apt-get autoremove openjdk-11-jre