You need to be administrator on a site and a hub.
The site needs to be registered and some courses need to be published.
1. Login as site administrator and access 'Admin > Server > Hubs' page
2. Select unregister from a hub.
3. On the unregistration page, select "Remove all courses currently being advertised on a hub" and "Removed all courses that were uploaded to a hub" and click unregister.
4. The registration page should be displayed and the hub should not appear in the 'Registered on' list.
5. Check that the courses that was published are not listed as published anymore on their publish page
6. Login as hub administrator and access manage sites page
7. Check that the site is not listed
8. Go to manage courses page and check that the site courses are not listed.