Because you have applications installed that require Java (like LibreOffice, which is a Java application). So if you uninstall it, the package manager will detect you would end up with a broken system and so installs another package to satisfy the dependencies.
I guess your concern would be mostly about Java in your browser, from security standpoint? You can easily remove Java from your browser with the following command:
- Code: Select all
sudo apt-get --purge autoremove icedtea-*
This completely removes the IcedTea-Web Plugin from Firefox, making your browser free from Java and so not a target for Java based malware.