How to completely wipe WSUS and start again

To re-install WSUS with a clean database i.e. no previous configuration:

Run Windows Powershell as Administrator and use the following commands:

  • Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart

  • Post restart, delete EVERYTHING in the C:\Windows\WID\ (for Win 2012 r2) folder.

  • Then run the following command to re-install WSUS:

    Install-WindowsFeature UpdateServices -Restart
    

This only works on PowerShell 3 or higher.
More info here: Microsoft TechNet: Removing Server Roles and Features


Answer now found, just posting this for the benefit of anyone else who might come across this problem.

It seems that uninstalling WSUS and WID Database option does not actually remove the WID database.

  • The WID database can be removed by uninstalling the Windows Internal Database feature.

  • You will also need to manually delete the file C:\windows\WID\Data\susdb.mdf before re-installing everything again.