Uninstall a relocatable package

Hi,

If a package has been installed at normal location:
installp -u <package_name>
uninstalls the package

However, if that has been installed relocatable, the above command fails.
It requires the relocatable path as the parameter
installp -R <relocation_path> -u <package_name>

To find the relocation path, i have to give:
lslpp -R ALL -l <package_name>
Check from here where the package has been installed and then add the path to the "installp -u" command.

I want to automate the uninstallation of a package. This fails if the package has been installed relocatably.

How do i get around this?

Thanks

Could somebody please help on this?