I recently ran in to a problem where I wanted to perform a clean configuration of one of my ESXi hosts from an NSX perspective, however I ran in to a problem where NSX was reporting that the packages are already installed. To fix the issue I had to run the following to list the packages installed:

esxcli software vib list | grep -i nsx

Once I had the list all I had to do is uninstall them using:

esxcli software vib remove -n packagename1 -n packagename2 ...

Once the uninstall was complete I was able to redeploy NSX from the NSX Manager

If you are cleaning up other stuck NSX objects, I also covered how to forcibly delete an NSX-T 3 segment.