def unlink(self, name):
        symlinks = self.read_bootstrap().get("symlinks", {})

        removed_targets = set()
        found = False
        for source_glob, target in symlinks.items():
            if self._islinkkey(source_glob, name):
                found = True
                for source, target in self.expandtargets(source_glob, target):
                    self._remove_link_target(source, target)
                    removed_targets.add(target)
                    shutil.move(source, target)
                    print(tty.progress("Moved {0} -> {1}".format(
                        collapseuser(source),
                        collapseuser(target)
                    )))

        if not found:
            raise StowError("No symlink found with name: {0}".format(name))

        try:
            os.rmdir(os.path.join(self.symlink_dir, name))
        except OSError as e:
            if e.errno != errno.ENOTEMPTY:
                raise e

        self.remove_symlink(name)
        self._update_target_cache(
            set(self._cached_targets()) - removed_targets
        )
dataset/ETHPy150Open msanders/cider/cider/core.py/Cider.unlink/original