remove unneeded patches and paths