AIX 3.1: Is there a "de-installp" ?

Frank Cannavale III/1024000 frank at ulticorp.UUCP
Sat Nov 10 12:52:17 AEST 1990


In article <6-$^~R&@rpi.edu> todd at unix.ecs.rpi.edu (R. Lindsay Todd) writes:
>Hi -- Now that I, as a new user of an RS6000, have discovered the
>joys of instupdt, installp, and updatep, I find that there are a
>few optional products installed that I really don't need.  Is there
>a clean way to remove them?  I know I could use lslpp to generate a
>list of files I need to remove, etc., but this would not update the
>database of installed products; is there a way to do this?


I don't have a really clean way of removeing the lpps that get loaded,
but this shell script sort of gets the ugly job done.  I'd certainly
would appreciate a better way, but this worked better than doing the
rm(s) by hand.


++++++++++++++++++++++++++CUT HERE++++++++++++++++++++++++++++++++
# Remove lpps.
# sed edits should be "s/<sp><sp>*/<tab>/g"
#
cd /
lpps=`lslpp -l -q|sed -e "s/  */	/g"|cut -f1|grep -v \#`
for lpp in $lpps
do
	lslpp -l $lpp
	echo "\n\nRemove this one? \c"
	read y_or_n
	if [ "$y_or_n" = "q" ]
	then
		exit 1
	fi
	if [ "$y_or_n" = "y" ]
	then
		for file in `lslpp -q -f $lpp|sed -e "s/  */	/g"|cut -f2`
		do
			echo rm -f $file
			rm -f $file
		done
	fi
done

**************************CUT HERE***********************

The rm is in a loop just for appearance sake, I like to see the
filename scroll past as they are deleted. Just weird
that way.
-- 
Frank Cannavale III !uunet!ulticorp!frank   The Ultimate Corp, E.  Hanover, NJ
"The Social Democratic government on Friday began dismantling the welfare state
it built, proposing sharp cuts in benefits and state jobs to stop the country's
economic decline." -- AP Stockholm, Sweden 10/26/90~
Too bad the US Congress doesn't read the news, it could learn something.



More information about the Comp.unix.aix mailing list