Undoes the uninstall by moving stashed files back.
14655
def rollback(self):
        """"""
        for p in self._moves:
            logging.info("Moving to %s\n from %s", *p)

        for new_path, path in self._moves:
            try:
                logger.debug('Replacing %s from %s', new_path, path)
                if os.path.isfile(new_path):
                    os.unlink(new_path)
                elif os.path.isdir(new_path):
                    rmtree(new_path)
                renames(path, new_path)
            except OSError as ex:
                logger.error("Failed to restore %s", new_path)
                logger.debug("Exception: %s", ex)

        self.commit()
1014235
private void cleanupBackupDir(int keep) {
        File[] backupDirFiles = getSortedBackupDirFiles();
        if (backupDirFiles.length > keep) {
            for (int i = keep; i < backupDirFiles.length; i++) {
                backupDirFiles[i].delete();
            }
        }
    }
352344
def remove(self, dist):
        """"""
        while dist.location in self.paths:
            self.paths.remove(dist.location)
            self.dirty = True
        Environment.remove(self, dist)
1013932
def unstash(self):
        
        if not self.stashed:
            LOGGER.error('no stash')
        else:
            LOGGER.info('popping stash')
            self.repo.git.stash('pop')
            self.stashed = False
1236743
def _cleanup(self):
        """"""
        for filename in os.listdir(self._storage_dir):
            file_path = path.join(self._storage_dir, filename)
            file_stat = os.stat(file_path)
            evaluate = max(file_stat.st_ctime, file_stat.st_mtime)
            if evaluate + self._duration < time.time():
                LOGGER.debug('Removing stale file: %s', file_path)
                os.unlink(file_path)
601212
def delete_data(self):
        
        self.clean_up()
        tools.delete_dir_rec(self._download_path)
        if self._save_state_file.exists():
            self._save_state_file.unlink()
328433
function remove()
    {
        $path = $this->path();
        if ( file_exists( $path ) )
        {
            eZDir::recursiveDelete( $path );
        }
        $this->setInstalled( false );
    }
544864
def clear(self):
        """"""
        for root, dirs, files in os.walk(self._root_dir, topdown=False):
            for file in files:
                os.unlink(os.path.join(root, file))
            os.rmdir(root)
        # Get the root dir back and re-initialise to start again
        root_dir = os.path.abspath(
            os.path.join(self._root_dir, os.pardir))
        self.__init__(root_dir)
582988
public function remove()
    {
        $this->setState('uninstall');

        $this->changeState();

        if (! $this->deleteDirectory()) {
            $this->setState('uninstalled');
        }

        return true;
    }
1210629
public function cleanup()
    {
        if ($this->option('force')) {
            $this->deleteDirs();
        } elseif ($this->confirm('Delete all subdirectories in migrations folder?', true)) {
            $this->deleteDirs();
        }
    }
689031
def uninstall(self):
        
        for item in self.items:
            uninstallFrom(item, self.store)
        self._items = []
14010
private void cleanup() {
        final String methodName = "cleanup(): ";
        try {
            final Bundle b = bundle.getAndSet(null);
            if (b != null) {
                if (tc.isDebugEnabled()) {
                    Tr.debug(tc, methodName + "Uninstalling bundle location: " + b.getLocation() + ", bundle id: " + b.getBundleId());
                }
                SecurityManager sm = System.getSecurityManager();
                if (sm != null) {
                    AccessController.doPrivileged(new PrivilegedAction<Void>() {
                        @Override
                        public Void run() {
                            try {
                                b.uninstall();
                                return null;
                            } catch (BundleException ignored) {
                                return null;
                            }
                        }
                    });
                } else {
                    b.uninstall();
                }
            }
        } catch (BundleException ignored) {
        } catch (IllegalStateException ignored) {

        }
    }
247646
function () {
        var i, entries = registry.entries()
        for (i in entries) {
          if (entries[i].type && entries[i].type !== 'unload')
            remove(entries[i].element, entries[i].type)
        }
        win[detachEvent]('onunload', cleanup)
        win.CollectGarbage && win.CollectGarbage()
      }
252655
def _cleanup(self):
        """"""
        self._expkg = None
        self._extmp = None
        self._flag_e = True
        self._ifile.close()
1312983
def uninstall(ctx, yes, services):
    """"""
    logger.debug("running command %s (%s)", ctx.command.name, ctx.params,
                 extra={"command": ctx.command.name, "params": ctx.params})

    home = ctx.obj["HOME"]

    for service in services:
        service_path = plugin_utils.get_plugin_path(home, SERVICES, service)
        plugin_utils.uninstall_plugin(service_path, yes)
1068712
def uninit():
    
    global run, config, watch_called, _saved_files
    run = config = None
    watch_called = False
    _saved_files = set()
354645
public void uninstallDefaults() {
        SeaGlassContext context = getContext(this, ENABLED);

        style.uninstallDefaults(context);
        context.dispose();
        style = null;
        JInternalFrame.JDesktopIcon di = frame.getDesktopIcon();

        if (di != null && di.getComponentPopupMenu() == systemPopupMenu) {

            // Release link to systemMenu from the JInternalFrame
            di.setComponentPopupMenu(null);
        }
    }