23

Anyone know of a way to completely wipe WSUS of updates and start again?

It seems as if I have loads of language packs and assorted rubbish in the list which we do not need. Having now removed all the unwanted Products, Classifications and Languages what I would like to do is completely clean out the WSUS database and start again. It appears that uninstalling the reinstalling the WSUS role does not help they are all still there. Have also tried the Server Cleanup wizard which seems to be mostly a waste of time, it didn't clean up any of the updates I was hoping it would remove.

I haven't yet installed any of these on a machines yet so if only I could work out how I could completely wipe all listed updates and start again but according to my new reduced Products list.

Thanks, Nick

1
  • I have a feeling that WSUS 2012 is just ignoring my Product, Classification & Language settings and listing whatever downloads it want to ignoring my settings.
    – NickC
    Nov 18, 2012 at 21:06

3 Answers 3

24

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

3
  • The uninstall worked well. The power shell install did not add the database back for me (the non SQL Server version). I ended up using the power shell command to uninstall, then the server manager add wizard to re-install.
    – pStan
    Feb 7, 2017 at 4:02
  • Watch out for the -Restart flag and make sure you are actually ready to restart the entire physical or virtual server.
    – jdgregson
    Apr 13, 2017 at 1:29
  • "I solved this issue by opening IIS Manager and deleting the old WSUS web site, then running the Complete WSUS Installation again." -mshorroshAvanade (Partner) social.technet.microsoft.com/Forums/windowsserver/en-US/… Aug 9, 2017 at 21:47
10

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.

3
  • 1
    Deleting the susdb.mdf-File will result in errors during post-installation-configuration, until the file is restored manualy.
    – Tobias
    Sep 28, 2015 at 12:47
  • What Tobias said. Does not work for 2012r2. Sep 13, 2016 at 10:07
  • WID is an internal database server that may be used for other things, so completely removing it could kill other services. For example, on a Windows 2016 Server running the Essentials role, besides the SUSDB, there is also a RaAcctDb database. Safer to use the official instructions in @StackzOfZtuff's answer, which only deletes the SUSDB.
    – Mark Berry
    Oct 20, 2018 at 17:56
9

Use official instructions

There is now an official blog post out:

This is my unofficial summary of the official blog post:

  1. stop-service WSUSService, W3SVC
  2. connect with SQL Server Management Studio (SSMS).
  3. Use SSMS to backup SUSDB
  4. Use SSMS to delete SUSDB
  5. Rename content directory
  6. Recreate content directory
  7. start-service WSUSService, W3SVC
  8. Run Program Files\Update Services\Tools.Wsusutil.exe postinstall (see blog for command line parameters)
  9. Done.

For WS2012/WS2012R2: Connecting to the Windows Internal Database requires the use of a Named Pipes connection. The connection string you want is:

\.\pipe\MICROSOFT##WID\tsql\query

For WS2003/WS2008/WS2008R2: Connecting to the Windows Internal Database requires the use of a Named Pipes connection. The connection string you want is:

\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

1
  • This assumes you use SQL, not WID.
    – Overmind
    Dec 11, 2019 at 6:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .