Home > CentOS, Linux, OpenStack, RHEL, Uncategorized > Yum clean up / rollback RHEL 6 / CentOS packages to the initial status.

Yum clean up / rollback RHEL 6 / CentOS packages to the initial status.

In short, playing with RDO – the RedHat OpenStack install script /puppet based .. yummm / I needed several times to rollback the RHEL installed machines to their initial state.

So, in short, in a view to clean everything to the “after install” status :

# if you are brave heart, execute it right away 🙂 
yum history list all | sed  '/D, E/d;/Erase/d' | awk '/^ *[[:digit:]]/ {print $1}' | sed  '/^1$/d;' | while read crap; do echo yum history undo $crap -y;done
# check what has been done : 
yum history list all
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: