I found that to fix this problem on my PC I had to delete the file:
C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\PeerNetworking\idstore.sst and the new version of that file too.
Then I followed the steps from this post:
Hi Mark,
First lets disable the services “HomeGroup Listener” and “HomeGroup Provider” and then try to leave the homegroup from both the computers.
To remove Homegroup (and stop Homegroup networking functionality):
1. Go toControl Panel -> Network and Sharing Center ->HomeGroup, and click onLeave the homegroup link to unjoin from any existing home group.
Note: If the home group are shared and hosted from the PC, all HomeGroup connections will be disconnected.
2. Click on Leave the homegroup and confirm. In the future, if you want to use Homegroup networking you can create a homegroup using this same dialog.
3. Go to Control Panel -> System and Security ->Administrative Tools, and double click on **Services.**Alternatively, type services.msc in Start Search.
4. For each of the following two services:
HomeGroup ListenerHomeGroup Provider
Do the following:
Stop the service, and then double click on the service to open Properties dialog, and set its Startup type to Disabled. Click OK when done.
I then tried to leave the homegroup with no success, so I went back and set the Startup type back to Manual and re-started the two services.
After that I tried to leave the homegroup and succeeded. No restarts or anything throughout the process.