Unregister a Host from RHN Spacewalk

If yum updates or yum anything provides a network error or if you simply want to unregister the system from a managed server like RHN Classic, Red Hat Satellite, Katello, or Spacewalk, there is a only one file in the way.

If presented with an error similar to this:

yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, rhnplugin, security

Network error: unknown protocol
This is likely the result of a system that is connected to Spacewalk or some other RHN-Register that is not available.

To resolve delete one file.

rm -f /etc/sysconfig/rhn/systemid

or gzip them temporarily.

gzip /etc/sysconfig/rhn/systemid
gzip /etc/sysconfig/rhn/up2date
yum clean all
yum repolist

To revert those changes. Note: that gzip -d has worked for me without having to include the .gz file extension.

gzip -d /etc/sysconfig/rhn/systemid
gzip -d /etc/sysconfig/rhn/up2date

Source(s)
http://www.redhat.com/archives/spacewalk-list/2008-September/msg00128.html