diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php
index 9a99473f8f..d9f26d5ac8 100644
--- a/core/Command/Upgrade.php
+++ b/core/Command/Upgrade.php
@@ -204,7 +204,7 @@ class Upgrade extends Command {
$output->writeln('Maintenance mode is kept active');
});
$updater->listen('\OC\Updater', 'updateEnd',
- function ($success) use($output, $updateStepEnabled, $self) {
+ function ($success) use($output, $self) {
if ($success) {
$message = "Update successful";
} else {