diff --git a/src/DependencyInjection/Compiler/RouteAutowiringPass.php b/src/DependencyInjection/Compiler/RouteAutowiringPass.php
index <HASH>..<HASH> 100644
--- a/src/DependencyInjection/Compiler/RouteAutowiringPass.php
+++ b/src/DependencyInjection/Compiler/RouteAutowiringPass.php
@@ -60,6 +60,7 @@ final class RouteAutowiringPass implements CompilerPassInterface
             /** @var RouteResource $resource */
             $resource = $container->get($id);
             $slotServices[$slot]->addMethodCall('import', [$resource->getResource(), '/', $resource->getType()]);
+            $container->removeDefinition($id);
         }
 
         $container->getDefinition('rollerworks_route_autowiring.route_loader')->replaceArgument(1, $slotsToServiceIds);
Remove resource after registration

Symfony <I> allows to get private services for testing, but the route autowiring services
are removed after the collector pass is done. To prevent getting unregistered service warnings
remove the resource service after processing.

There are no tests, but I confirmed this in a another project.