diff --git a/cli/Commands/DI/Reset.php b/cli/Commands/DI/Reset.php
new file mode 100644
index 0000000000000000000000000000000000000000..646bfb6eaa2addeebb12000023acb961732d3f07
--- /dev/null
+++ b/cli/Commands/DI/Reset.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace Studip\Cli\Commands\DI;
+
+use Studip\DIContainer;
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class Reset extends Command
+{
+    protected static $defaultName = 'di:reset';
+
+    protected function configure(): void
+    {
+        $this->setDescription('Resets the compiled DI container');
+    }
+
+    protected function execute(InputInterface $input, OutputInterface $output): int
+    {
+        $file = DIContainer::getCompilationPath() . '/' . DIContainer::getCompilationClass() . '.php';
+
+        if (file_exists($file) && !unlink($file)) {
+            $output->writeln('<error>Could not removed compiled file.</error>');
+            return Command::FAILURE;
+        }
+
+        return Command::SUCCESS;
+    }
+}
diff --git a/cli/studip b/cli/studip
index a46a00debd5d64d690fc9e0735ddd3a8aab04c08..971ad8e6368f5cfaa9b38eaa3321e72a9c39dce4 100755
--- a/cli/studip
+++ b/cli/studip
@@ -33,6 +33,7 @@ $commands = [
     Commands\Cronjobs\CronjobWorker::class,
     Commands\DB\Dump::class,
     Commands\DB\MoveMatrikelnummer::class,
+    Commands\DI\Reset::class,
     Commands\Files\Dump::class,
     Commands\Fix\Biest7789::class,
     Commands\Fix\Biest7866::class,
diff --git a/lib/classes/DIContainer.php b/lib/classes/DIContainer.php
index 818d19102677798c38a3cf676ffaf090139aaff8..307ed4ad71889c3ab6bfe1ca4e90d1a39460094c 100644
--- a/lib/classes/DIContainer.php
+++ b/lib/classes/DIContainer.php
@@ -47,7 +47,10 @@ class DIContainer
     {
         $builder = new ContainerBuilder();
         if (\Studip\ENV == 'production') {
-            $builder->enableCompilation($GLOBALS['TMP_PATH']);
+            $builder->enableCompilation(
+                self::getCompilationPath(),
+                self::getCompilationClass()
+            );
         }
         $builder->ignorePhpDocErrors(true);
         $builder->addDefinitions('lib/bootstrap-definitions.php');
@@ -60,4 +63,14 @@ class DIContainer
 
         return $builder;
     }
+
+    public static function getCompilationPath(): string
+    {
+        return $GLOBALS['TMP_PATH'];
+    }
+
+    public static function getCompilationClass(): string
+    {
+        return 'CompiledContainer';
+    }
 }