Cannot uninstall Netbeans with a different user than the one that performed the installation

Logo Apache Netbeans

If when trying to uninstall Netbeans on Windows you see this message:

The specified target component – nb-all/ was not found in the registry. The installer can continue as if the target component was not specified.
Click Yes to continue, No to exit the installer.

If you select No, the installer will close. If you select Yes you’ll continue to the next steps but at the end Netbeans won’t be uninstalledL

The problem is that the user I’m logged in is not the same who installed Netbeans. To be able to uninstall Netbeans, we have to identify the user who installed it.

First, we have to find the user who installed Netbeans. In the C:\Users\User folder there should be a folder named .nbi, let’s find it:

If we go to the .nbi folder and click on the Explorer address bar, we can copy the full path to the .nbi folder by selecting the whole text, right click and copy (or Ctrl + C):

Now, we have to run the uninstall.exe application in the Netbeans folder, but do it from the command line, either using Powershell or System symbol. We can use the File Explorer and go to the Netbeans folder (in my case it’s C:\Program Files\Netbeans-12.2). Located in the Netbeans folder, press and hold the Shift key on the keyboard and right click with your mouse on the File Explorer window, then you’ll see some additional items on the contextual menu, such as Open Powershell window here as shown on the next screenshot:

Type the following on the Powershell window and press Enter to run:

.\uninstall.exe --userdir 'C:\Users\Usuario\.nbi'

And now the uninstaller will be able to remove Netbeans.

If the uninstaller indicates that it can’t find the JDK:

you can continue by downloading and installing a Java JDK or maybe you already have one but your environment variables have not been set. If the latter, you can also add the JDK path to the uninstall.exe program on the command line as follows:

.\uninstall.exe --userdir 'C:\Users\Usuario\.nbi' --javahome 'C:\Programas\jdks\adopt-openjdk-1.8.0_282\jre\'

Finally, Netbeans has been uninstalled.

Be the first to comment

Leave a Reply

Your email address will not be published.