Remove Spacewalk client from the Spacewalk Server


In other words "Un-register" the client from the spacewalk server 

this process requires work both on the server side and client side 


How to remove/unregister a System from Red Hat Satellite 5.x?

Red Hat Satellite-5.x does not provide an option to unregister client.
The only option available to remove a client from satellite server is to delete the client's profile from satellite server.
To remove clients profile from satellite server perform these steps:
Log in to the Satellite server's web-ui.
Click on the Systems tab in the top navigation bar and then click on the name of the system from the System List which you want to remove from the satellite.
Click the Delete System link in the top-right corner of the page.
Confirm system profile deletion by clicking the Delete System button.

Now go to the client system and execute below command to remove the associated systemid file:
# rm -rf /etc/sysconfig/rhn/systemid

Delete system from Red Hat Satellite Server using API
To delete a system from Satellite using spacewalk-api run the below command on satellite server:

#spacewalk-api --server=localhost --user=admin --password=**** system.deleteSystem %session% <SYSTEM_ID>
#spacewalk-api --server=localhost --user=admin --password=mypassword system.deleteSystem %session% 100983563

What is the correct procedure from unregistering a currently registered Spacewalk client from the Spacewalk server? I know deleting the instance from the Spacewalk server GUI is once step, but what about on the client side?

You can either remove all client packages
yum remove rhn* osad spacewalk* yum-rhn-plugin
or just disable spacewalk services
systemctl disable rhnsd
systemctl disable rhnmd
sed -i 's/enabled *= *1/enabled=0/' /etc/yum/pluginconf.d/rhnplugin.conf



The system ID is given/assigned to the client by the server and this is how the server ID and track this system. "/etc/sysconfig/rhn/systemid"