On Wed, Aug 10, 2011 at 08:32:40AM +0200, Leonard den Ottolander wrote:
> 
> rpm -e will not remove any package that has dependencies on it.

Along similar lines there is this short shell script put together by
Mike Harris.  This will go through all installed rpms and list which may
be removable based on outstanding dependencies.  In order to make full
use of this script you should run it after every package removal as
dependencies will change.  Using this, or similar concepts, it's
possible to get an extremely small base system installed by using the
remaining package set in a kickstart install.

#!/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

-- 
"Here's what I do know.  I don't care.  I'm sick of it.  I'm sick of needy,
crazy, stupid liars.  Seriously, I can't take it anymore.  I grew up with
them, I live with them, I work with them.  And no matter how fast I run
or how far I go they breed and come after me.  It's like a zombie movie
except the only scary part is it never ends."

-- 13 seconds of dialogue from Mary McCormack as Mary Shannon in USA's
   "In Plain Sight"

Attachment: pgpLIwlomg2Uv.pgp
Description: PGP signature

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to