function to delete install directory