I am running Ubuntu GNOME 16.04.1 with GNOME 3.20 (though I was running 15.10 when I installed it) and when I installed NetBeans 8.1 I selected to install Tomcat and GlassFish as well which seem to be located in /usr/local as far as I can tell along with NetBeans. NetBeans also seems to be quite interconnected with them so I would probably have to do at least part of the uninstallation through NetBeans or would have to do quite a lot of tweaking to cleanly remove them.
But as I don't have a real use for them and security updates keep being released for Tomcat, but even though there is a bugzilla report open on this matter, they haven't backported in a Tomcat update in ages so I am rather worried on the security front.
So is there any way to uninstall Tomcat and GlashFish? I have checked and it did not install the packages from the repositories.