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