Will remove all generated files.

@return void.
545226
public function cleanCommand()
    {
        if (is_dir($this->buildSettings['target'])) {
            \TYPO3\Flow\Utility\Files::removeDirectoryRecursively($this->buildSettings['target']);
        }
        mkdir($this->buildSettings['target']);

        $this->outputLine('Cleaned target folder.', [], CommandController::OK);
    }
544099
private function removeOldFiles()
    {
        if ($handle = opendir($this->uploadDir)) {

            while (false !== ($file = readdir($handle))) {
                if (is_file($file)) {
                    if (filectime($this->uploadDir . $file) < (time() - $this->fileHandleTime)) {
                        unlink($this->uploadDir . $file);
                    }
                }
            }
        }
    }
1208120
public function deleteFiles()
    {
        $files = [];
        foreach ([
            DIR_CONFIG_SITE . '/site_install.php',
            DIR_CONFIG_SITE . '/site_install_user.php',
        ] as $file) {
            if ($this->filesystem->isFile($file)) {
                OpCache::clear($file);
                $files[] = $file;
            }
        }
        if (!empty($files)) {
            $this->filesystem->delete($files);
        }
    }
592042
protected function cleanup()
    {
        // if $this->fs is an object, the Filesystem has been used, clean it up.
        if (is_object($this->fs)) {
            if ($this->fs->isDirectory($this->tempPath)) {
                $this->fs->deleteDirectory($this->tempPath, false);
            }
        }
    }
157973
public static function clearAll()
    {
        $dir = new \DirectoryIterator(static::config('directory'));

        foreach ($dir as $fileinfo) {

            if ($fileinfo->isFile()) {
                $cacheKey = $fileinfo->getFilename();
                static::clear($cacheKey);
            }
        }
    }
725504
private function clean()
    {
        foreach (Finder::find($this->namespace . '*')->from($this->tempDir)->childFirst() as $entry) {
            $path = (string)$entry;
            if ($entry->isDir()) {
                //We dont use dirs, ignore
                continue;
            }

            $updateDate = $this->cache->load($entry->getFilename());
            if ($updateDate === null) {
                @unlink($path);
            }
        }

        return;
    }
1293916
public static function cleanup(): void
    {
        $releaseName = sprintf("%s/%s", Utilities::getBasePath(), Utilities::getReleaseName());
        if (is_file($releaseName . '.tar.gz')) {
            unlink($releaseName . '.tar.gz');
        }

        if (is_file($releaseName . '.tar')) {
            unlink($releaseName . '.tar');
        }
    }
999047
public function clear()
    {
        $result = true;
        $dir = new \DirectoryIterator($this->path);
        foreach ($dir as $file) {
            $extension = pathinfo($file->getFilename(), PATHINFO_EXTENSION);
            if (!$file->isDot() && $extension === 'ser') {
                if (!@unlink($this->path.'/'.$file->getFilename())) {
                    $result = false;
                }
            }
        }

        return $result;
    }
524958
protected function cleanUpAll()
    {
        if ( $this->Options['clean-all'] )
        {
            $this->CLI->output( "eZSearchEngine: Cleaning up search data for all installations" );
            $searchEngine = new eZSolr();
            // The essence of teh All suffix
            $allInstallations = true;
            // Optimize: sets all indexes to minimal file size too
            $optimize = true;
            $searchEngine->cleanup( $allInstallations, $optimize );
        }
    }
899132
public function clear()
    {
        if (null !== $this->aSource) {
            $this->aSource->removeCategory($this);
        }
        $this->id = null;
        $this->source_id = null;
        $this->pageid = null;
        $this->title = null;
        $this->files = null;
        $this->subcats = null;
        $this->pages = null;
        $this->size = null;
        $this->hidden = null;
        $this->created_at = null;
        $this->updated_at = null;
        $this->tree_left = null;
        $this->tree_right = null;
        $this->tree_level = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
918587
public function clear()
    {
        if (null !== $this->aSource) {
            $this->aSource->removeMedia($this);
        }
        $this->id = null;
        $this->source_id = null;
        $this->pageid = null;
        $this->title = null;
        $this->url = null;
        $this->mime = null;
        $this->width = null;
        $this->height = null;
        $this->size = null;
        $this->sha1 = null;
        $this->thumburl = null;
        $this->thumbmime = null;
        $this->thumbwidth = null;
        $this->thumbheight = null;
        $this->thumbsize = null;
        $this->descriptionurl = null;
        $this->descriptionurlshort = null;
        $this->imagedescription = null;
        $this->datetimeoriginal = null;
        $this->artist = null;
        $this->licenseshortname = null;
        $this->usageterms = null;
        $this->attributionrequired = null;
        $this->restrictions = null;
        $this->timestamp = null;
        $this->user = null;
        $this->userid = null;
        $this->missing = null;
        $this->known = null;
        $this->imagerepository = null;
        $this->created_at = null;
        $this->updated_at = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
1056865
public function forgetUsed()
    {
        if ($this->app['files']->exists($this->getUsedStoragePath())) {
            $this->app['files']->delete($this->getUsedStoragePath());
        }
    }
942689
protected function removePresets()
    {
        $files = new Filesystem;
        $files->delete("{$this->sageRoot}/resources/assets/styles/autoload/_tachyons.scss");
        $files->delete("{$this->sageRoot}/resources/assets/styles/autoload/_bootstrap.scss");
        $files->delete("{$this->sageRoot}/resources/assets/styles/autoload/_bulma.scss");
        $files->delete("{$this->sageRoot}/resources/assets/styles/autoload/_foundation.scss");
        $files->delete("{$this->sageRoot}/resources/assets/scripts/autoload/_bootstrap.js");
        $files->delete("{$this->sageRoot}/resources/assets/scripts/autoload/_foundation.js");
        $files->delete("{$this->sageRoot}/resources/assets/build/webpack.config.preset.js");
        $files->delete("{$this->sageRoot}/resources/assets/styles/tailwind.config.js");
    }
271132
public function clearCache()
  {
    $files = glob($this->cachePath);
    foreach($files as $file) {
      if (is_file($file)) {
        unlink($file);
      }
    }
  }
324627
public function purgeAll() {
		if ($this->log) {
			if ($this->log instanceof LoggerInterface) {
				$this->log->info("Purging the whole file cache.");
			} else {
				$this->log->trace("Purging the whole file cache.");
			}
		}
        self::rrmdir($this->getDirectory());
	}
1310493
public function remove_files() {
        $fs = get_file_storage();
        $files = $fs->get_external_files($this->id);
        foreach ($files as $storedfile) {
            $storedfile->delete();
        }
    }
974230
public function cleanUp()
    {
        $composerBinDirectory = $this->configuration->getComposerBinDirectory();

        if (false === is_dir($composerBinDirectory)) {
            $this->helper->getFilesystem()->createDirectory($composerBinDirectory);
        }

        $this->removeFromDir($composerBinDirectory);
        $this->removeFromDir(
            $this->configuration->getBinDirectory(),
            array_keys($this->configuration->getTools())
        );
    }