How can I hide the Homegroup icon on the desktop?

You need to modify some registry keys. Here are the instructions on Microsoft's Windows 7 forums:

To remove the Home desktop Group icon, you need to manually modify some registry key:
  1. Open notepad and then copy the following text (without ===) into it.

    ================================
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
    "{B4FB3F98-C1EA-428d-A78A-D1F5659CBA93}"=dword:00000001
    
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu]
    "{B4FB3F98-C1EA-428d-A78A-D1F5659CBA93}"=dword:00000001
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
    "{B4FB3F98-C1EA-428d-A78A-D1F5659CBA93}"=dword:00000001
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu]
    "{B4FB3F98-C1EA-428d-A78A-D1F5659CBA93}"=dword:00000001
    ===========================================
    
  2. Save the txt file and rename to xxx.reg. Then double click xxx.reg to import the registry key.
(answer by Thomas_77)
  1. Go to "Folder Options"
  2. Click "View"
  3. Scroll down to "Use Sharing Wizard (Recommended)", it must be checked
  4. Uncheck the checkbox
  5. Click "Apply" (the icon will be removed from your desktop)
  6. Recheck the checkbox (the icon will not be back)

Or, if you don't fancy modifying your registry, just stop and disable the follwing services:

HomeGroup Listener
HomeGroup Provider

Ben


Following the link provided by Alex, I found an easy way to get rid of Homegroup icon from desktop.

Quote from zzark's answer:

right-click on the Homegroup icon, select homegroup settings, then select leave homegroup.