Windows – how can I clear stale workgroups from windows machine

netbioswindows

I have a list of netbios workgroups that I can see with "net view" on Windows 7. One of these workgroups is there due to a typo error on another machine, that has since been corrected. I want to remove this stale entry.

I have tried:

nbtstat -R
nbtstat -RR

but when I redo "net view" the erroneous workgroup is still there.

How to I purge the cache that "net view" displays ?

Best Answer

It should disappear all by itself. "Workgroup" names you are seeing with net view are held by a group of computers running the "Browser" service and having been elected as master or backup browsers for your subnet. The registrations are made by Windows hosts claiming to be part of a certain workgroup. There is no functionality in the protocol to actively remove the names, but the registrations age out automatically after a while if not renewed. From the relevant documentation:

A failed server stops announcing itself. When the master browser does not receive a server announcement for three of the server's current announcement periods, the master browser removes that server from the browse list. It might take up to an additional 15 minutes for the backup browsers to retrieve the updated browse list from the master browser, so it could take as long as 51 minutes from the time a server fails to the time when it is removed from all browse lists.

It should be added that browsing as means to discover resources in a network has been deprecated. The protocol's roots reach back to LanManager in the late 1980 and it is regarded mostly inappropriate for modern networks' needs.