repack: refactor pack deletion for future use