Steve Endow tackles a great topic over at Dynamics GP Land, Removing Dynamics GP companies that no longer exist. This happens most often with test companies, when firms move servers or when they combine multiple GP companies into one leaving orphan companies.
Removing Dynamics GP companies that no longer exist
Archived post from 2010. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.