Fix for custom install directory can not remove when uninstall the package

Fix for custom install directory can not remove when uninstall the package