''

def _remove_existing_copy(self, path, metadata):

    if self.verbose:
        logger().info(('    %s._remove_existing_copy()' % self.__class__.__name__))
    if self.manual_sync_mode:
        for book in self.cached_books:
            if ((self.cached_books[book]['uuid'] == metadata.uuid) or ((self.cached_books[book]['title'] == metadata.title) and (self.cached_books[book]['author'] == metadata.author))):
                self.update_list.append(self.cached_books[book])
                self._remove_from_device(self.cached_books[book])
                break
        else:
            if self.verbose:
                logger().info(("        '%s'    not    in    cached_books" % metadata.title))
    else:
        for book in self.cached_books:
            if ((self.cached_books[book]['uuid'] == metadata.uuid) or ((self.cached_books[book]['title'] == metadata.title) and (self.cached_books[book]['author'] == metadata.author))):
                self.update_list.append(self.cached_books[book])
                if self.verbose:
                    logger().info(("        deleting    library    book    '%s'" % metadata.title))
                self._remove_from_iTunes(self.cached_books[book])
                break
        else:
            if self.verbose:
                logger().info(("        '%s'    not    found    in    cached_books" % metadata.title))
