Full Silent Uninstall of Tomcat on Windows
If you navigate to the Tomcat folder you will find an Uninstall item, click it. When I did this step it told me that I needed to uninstall it from the "Add or Remove Programs" application in Windows.
Related videos on Youtube
Andy Madge
Updated on September 18, 2022Comments
-
Andy Madge over 1 year
When running the silent uninstall command:
"C:\Program Files\Apache Software Foundation\Tomcat 8.5\Uninstall.exe" /S -ServiceName="Tomcat8"
Tomcat is uninstalled but it leaves behind a bunch of files in the
conf
,logs
andwebapps
folders.When uninstalling via Windows Program & Features, the GUI uninstaller shows a prompt asking whether to delete these extra files/folders.
Is there an argument/option that will delete these files with the silent uninstall?
I've looked through the Tomcat docs but there is no mention of the silent uninstall. I've even looked through the Tomcat source code, but I can't find any clues.
This page suggests that Tomcat uses NSIS Installer but the docs aren't helpful.
I'm trying to find the answer for both Tomcat 8.5 and 7.0 if possible.
-
Andy Madge over 6 yearsThis section in the source seems to suggest that the only supported option is
-ServiceName=
so that may mean what I'm asking for doesn't exist -
spacenomyous over 6 yearsI didn't see anything on the documentation either. I found references to people using Uninstall scripts, which probably do the cleanup tasks, like folder deletion separately
-
Andy Madge over 6 yearsThat makes sense, it looking like I'll need to go the same way
-
Bill_Stewart over 4 yearsIMO the uninstall process should not delete files it did not install. If the admin that's doing the uninstall wants to do that later, that's fine, but it should not be part of the uninstall process.
-