candlepin/subscription-manager — pull request #362 by beav (2012-10-30 13:54:05+00:00)
Title: new yum plugin to erase products

New yum plugin to erase packages for a product

There are cases when a user will want to remove a product from a system. Two
examples are if the user wants to get "green" without adding entitlements, or
if the user is consuming more products than they'd like via splice.

This plugin allows the user to run "yum erase-product --productname 'foo'", and
all packages installed from the 'foo' repo will be removed. This will cause the
product-id plugin to recognize that 'foo' is no longer being consumed, and the
product cert will be removed from the system.

Example usage
--------------

bash# subscription-manager list
+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product Name: Awesome Foo Product
Product ID: 999
Version: 4.0
Arch: x86_64
Status: Subscribed
Starts: 10/29/2012 03:51:44 PM
Ends: 10/29/2012 04:51:44 PM

bash# yum erase-product --productname="Awesome Foo Product"
*typical yum erase output*
Removed packages for Awesome Foo Product

bash# subscription-manager list
No installed products to list