Chapter 7. Deleting a system from Insights inventory

You can delete a system from the Red Hat Hybrid Cloud Console inventory so that the system is no longer visible in the Red Hat Insights for Red Hat Enterprise Linux Inventory or advisor service Systems list. The Insights client will be unregistered on the system and no longer report data to Red Hat Insights for Red Hat Enterprise Linux. To delete a system, complete the steps in the procedure below that is most relevant to your use case.

Procedure 1: Delete using the Insights client

  1. Enter the following command on the system command line:

    [root@server ~]# insights-client --unregister

Procedure 2: Delete from the Red Hat Satellite 6 UI

  1. Log in to the Satellite web UI.
  2. Navigate to Insights > Inventory.
  3. Select the system profile to be unregistered.
  4. Click Actions > Unregister.

Procedure 3: Delete using the cloud.redhat.com API

Use this option only when the actual system is destroyed/re-installed. If you use the DELETE API without unregistering the client, hosts will reappear the next time the client uploads data.

  1. Get the list of system profiles from inventory.

    # curl -k --user PORTALUSERNAME https://cloud.redhat.com/api/inventory/v1/hosts | json_pp > hosts.json
  2. If the json_pp command does not exist on the system then install the perl-JSON-PP package.

    # yum install perl-JSON-PP
  3. Get the ID of the system from the hosts.json file and confirm system details; for example, "id" : "f59716a6-5d64-4901-b65f-788b1aee25cc".

    # curl -k --user PORTALUSERNAME https://cloud.redhat.com/api/inventory/v1/hosts/f59716a6-5d64-4901-b65f-788b1aee25cc
  4. Delete the system profile using the following command:

    # curl -k --user PORTALUSERNAME -X "DELETE" https://cloud.redhat.com/api/inventory/v1/hosts/f59716a6-5d64-4901-b65f-788b1aee25cc