public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
{
if ($this->isSourceDirUnused($package) && $this->io->askConfirmation("The package version <info>" . $package->getPrettyName() . "</info> " . "(<fg=yellow>" . $package->getPrettyVersion() . "</fg=yellow>) seems to be unused." . PHP_EOL . 'Do you want to <fg=red>delete the source folder</fg=red> ? [y/n] (default: no) : ', false)) {
$this->packageDataManager->setPackageInstallationSource($package);
parent::uninstall($repo, $package);
} else {
$this->binaryInstaller->removeBinaries($package);
$repo->removePackage($package);
}
$this->packageDataManager->removePackageUsage($package);
$this->removePackageVendorSymlink($package);
}