15.3.2.2. Removing Subscriptions from the Command Line
A system can be attached to multiple subscriptions and products. Similarly, a single subscription or all subscriptions can be removed from the system.
Running the
unsubscribe
command with the --all
option removes every product subscription and subscription pool that is currently attached to the system.
[root@server1 ~]# subscription-manager unsubscribe --all
It is also possible to remove a single product subscription. Each product has an identifying X.509 certificate installed with it. The product subscription to remove is identified in the
unsubscribe
command by referencing the ID number of that X.509 certificate.
- Get the serial number for the product certificate, if you are removing a single product subscription. The serial number can be obtained from the subscription#
.pem
file (for example,392729555585697907.pem
) or by using thelist
command. For example:[root@server1 ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Product Subscriptions +-------------------------------------------+ ProductName: High availability (cluster suite) ContractNumber: 0 SerialNumber: 11287514358600162 Active: True Begins: 2010-09-18 Expires: 2011-11-18
- Run the subscription-manager tool with the
--serial
option to specify the certificate.[root@server1 ~]# subscription-manager unsubscribe --serial=11287514358600162