protected function removeObsoleteEnvironments($paths, $project, $dryRun = false) {
		$list = $project->Environments();

		$basePaths = array_map(function($path) {
			return basename($path);
		}, $paths);

		$removeList = $list->filter('Filename:not', $basePaths);
		if($removeList->count() === 0) {
			return;
		}

		foreach($removeList as $remove) {
			$this->message('Removing "'.basename($remove->Name).'" from db');
			if(!$dryRun) {
				$removeList->remove($remove);
			}
		}
	}