Removes the virtualenv directory from the system.
180063
def cleanup_virtualenv(bare=True):
    """"""
    if not bare:
        click.echo(crayons.red("Environment creation aborted."))
    try:
        # Delete the virtualenv.
        vistir.path.rmtree(project.virtualenv_location)
    except OSError as e:
        click.echo(
            "{0} An error occurred while removing {1}!".format(
                crayons.red("Error: ", bold=True),
                crayons.green(project.virtualenv_location),
            ),
            err=True,
        )
        click.echo(crayons.blue(e), err=True)
742767
def clear_dir(self):
        """"""
        for snapshot in output_utils.get_filenames(self.output_dir):
            if snapshot.endswith('.pkl'):
                os.remove(snapshot)
735158
def clear_file_systems(self):
        """"""

        self._source_url = None
        self.dataset.config.library.source.url = None
        self._source_fs = None

        self._build_url = None
        self.dataset.config.library.build.url = None
        self._build_fs = None

        self.dataset.commit()
902096
def remove(self):
        """"""
        if self.exists() or self.islink():
            self.fs.unlink(self.get_internal_path())
            return 1
        return None
341476
def remove(self):
        '''
        
        '''
        print 'remove'
        if self.exists():
            print 'cleaning', self.venv
            run('rm -rf {}'.format(self.venv))
1182834
def _remove_bcbiovm_path():
    
    cur_path = os.path.dirname(os.path.realpath(sys.executable))
    paths = os.environ["PATH"].split(":")
    if cur_path in paths:
        paths.remove(cur_path)
        os.environ["PATH"] = ":".join(paths)
697109
def _cleanup(self):
        '''
        
        '''
        if (hasattr(self, 'config')
           and self.config.get('support_archive')
           and os.path.exists(self.config['support_archive'])):
            self.out.warning('Terminated earlier, cleaning up')
            try:
                os.unlink(self.config['support_archive'])
            except Exception as err:
                log.debug(err)
                self.out.error('{} while cleaning up.'.format(err))
247280
def cleanup_storage vm
      vm.volumes.each do |vol|
        @logger.debug "Deleting volume #{vol.name} for OpenStack host #{vm.name}"
        vm.detach_volume(vol.id)
        vol.wait_for { ready? }
        vol.destroy
      end
    end
532249
def cleanup_deployments(self):
        
        deployments = self.list_deployments()

        for deployment in deployments:
            if deployment.namespace in self.managed_namespaces:
                deployment.delete()
360618
def cleanup():
        """"""
        for install_dir in linters.INSTALL_DIRS:
            try:
                shutil.rmtree(install_dir, ignore_errors=True)
            except Exception:
                print(
                    "{0}\nFailed to delete {1}".format(
                        traceback.format_exc(), install_dir
                    )
                )
                sys.stdout.flush()
876337
def cleanup_tmpdir(dirname):
    """"""
    if dirname is not None and os.path.exists(dirname):
        shutil.rmtree(dirname)
1238435
def _sysv_delete(name):
    '''
    
    '''
    if not _service_is_chkconfig(name):
        return False
    cmd = '/sbin/chkconfig --del {0}'.format(name)
    return not __salt__['cmd.retcode'](cmd)
1056671
def stop_vm(self):
        
        if self.vagrant is not None:
            if self.destroy:
                self.vagrant.destroy()
                shutil.rmtree(self.vagrant.root, ignore_errors=True)
                self.vagrant = None
            else:
                self.vagrant.halt()
1159552
def cleanup_temp_filesystem(self):
        
        logger.debug("Deleting compressed file extraction directory: " + self.tmp_dir)
        shutil.rmtree(self.tmp_dir, True)
703103
def clear(self):
        '''
        
        '''
        if os.path.exists(self.path):
            os.remove(self.path)
164318
def clean_dir(root):
    ''''''
    for x in root.walkdirs('.*', errors='ignore'):
        x.rmtree()
    for x in root.walkdirs('_*', errors='ignore'):
        x.rmtree()

    for x in root.walkfiles('.*', errors='ignore'):
        x.remove()
    for x in root.walkfiles('_*', errors='ignore'):
        x.remove()
234135
def clean_dists(self, _args):
        """"""
        ctx = self.ctx
        if exists(ctx.dist_dir):
            shutil.rmtree(ctx.dist_dir)