anchor.diff:      %% The additions are new, so we need to link them to the CBV (the
       %% checksums will already be present in the database, and the
       %% corresponding files will have already been uploaded to S3).
  -    case delete_cookbook_checksums(UnlinkFromCBV, OrgId, Id) of
  +    case unlink_checksums_from_cbv(UnlinkFromCBV, OrgId, Id) of
           ok ->
  -            DeleteFromS3 = delete_checksums(OrgId, UnlinkFromCBV),
  +            DeleteFromS3 = delete_orphaned_checksums(OrgId, UnlinkFromCBV),
               case insert_cookbook_checksums(AddToCBV, OrgId, Name, Major, Minor, Patch) of
                   ok -> {ok, AddToCBV, DeleteFromS3};
                   Error -> Error
  
positive.code: delete_cookbook_version(#chef_cookbook_version{id=CookbookVersionId,
                                                 org_id=OrgId,
                                                 name=Name}) ->
      case delete_cookbook_version_checksums(OrgId, CookbookVersionId) of
          {ok, DeletedChecksums} ->
              CookbookDelete = case delete_object(delete_cookbook_version_by_id, CookbookVersionId) of
                                   {ok, 1} ->
  
negative.code:                     Acc;
                  {error, Reason} ->
                      error_logger:error_msg("Checksum deletion error: ~p~n"
                                             "{~p,delete_orphaned_checksums,2,[{file,~p},{line,~p}]}~n",
                                             [Reason, ?MODULE, ?FILE, ?LINE]),
                      Acc
              end
  