Skip to content

Instantly share code, notes, and snippets.

@ian-kent
Created March 10, 2014 18:47
Show Gist options
  • Save ian-kent/9471571 to your computer and use it in GitHub Desktop.
Save ian-kent/9471571 to your computer and use it in GitHub Desktop.
RPM removal script by Mike harris
#!/bin/sh
#
## this script originated from a one-liner posted to #centos-social
## by Mike Harris; mharris on irc.freenode.net. Script used with
## permission.
#
for each in $(rpm -qa |sort)
do
echo "$(rpm -e --test $each &> /dev/null && echo YES || echo 'NO '): $each"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment