Better package list update behavior, delete packages before deleting context to avoid handle delete issues