Classes/Console/Command/ExtensionCommandController.php
public function removeInactiveCommand($force = false)
    {
        $this->outputLine('<warning>This command is deprecated and will be removed with TYPO3 Console 6.0</warning>');
        if ($force) {
            $activePackages = $this->packageManager->getActivePackages();
            $this->packageManager->scanAvailablePackages();
            foreach ($this->packageManager->getAvailablePackages() as $package) {
                if (empty($activePackages[$package->getPackageKey()])) {
                    $this->packageManager->unregisterPackage($package);
                    if (is_dir($package->getPackagePath())) {
                        GeneralUtility::flushDirectory($package->getPackagePath());
                        $removedPaths[] = PathUtility::stripPathSitePrefix($package->getPackagePath());
                    }
                }
            }
            $this->packageManager->forceSortAndSavePackageStates();
            if (!empty($removedPaths)) {
                $this->outputLine('<info>The following directories have been removed:</info>' . chr(10) . implode(chr(10), $removedPaths));
            } else {
                $this->outputLine('<info>Nothing was removed</info>');
            }
        } else {
            $this->outputLine('<warning>Operation not confirmed and has been skipped</warning>');
            $this->quit(1);
        }
    }
public function removeInactiveCommand($force = false)
    {
        $this->outputLine('<warning>This command is deprecated and will be removed with TYPO3 Console 6.0</warning>');
        if ($force) {
            $activePackages = $this->packageManager->getActivePackages();
            $this->packageManager->scanAvailablePackages();
            foreach ($this->packageManager->getAvailablePackages() as $package) {
                if (empty($activePackages[$package->getPackageKey()])) {
                    $this->packageManager->unregisterPackage($package);
                    if (is_dir($package->getPackagePath())) {
                        GeneralUtility::flushDirectory($package->getPackagePath());
                        $removedPaths[] = PathUtility::stripPathSitePrefix($package->getPackagePath());
                    }
                }
            }
            $this->packageManager->forceSortAndSavePackageStates();
            if (!empty($removedPaths)) {
                $this->outputLine('<info>The following directories have been removed:</info>' . chr(10) . implode(chr(10), $removedPaths));
            } else {
                $this->outputLine('<info>Nothing was removed</info>');
            }
        } else {
            $this->outputLine('<warning>Operation not confirmed and has been skipped</warning>');
            $this->quit(1);
        }
    }
Removes all extensions that are not marked as active

Directories of inactive extension are <comment>removed</comment> from <code>typo3/sysext</code> and <code>typo3conf/ext</code>.
This is a one way command with no way back. Don't blame anybody if this command destroys your data.
<comment>Handle with care!</comment>

This command is deprecated.
Instead of adding extensions and then removing them, just don't add them in the first place.

@param bool $force The option has to be specified, otherwise nothing happens