public static function cleanUpOldModules(Event $event)
    {
        $composer = $event->getComposer();
        $requires = $composer->getPackage()->getRequires();

        $projectPath = str_replace('vendor/vkf/shop', '', $composer->getInstallationManager()->getInstallpath($composer->getPackage()));
        $modulePath = $projectPath . 'htdocs/modules';
        foreach (array('ra', 'vkf') as $renzelVendorDir) {
            foreach (glob($modulePath . '/' . $renzelVendorDir . '/*') as $file) {
                if (is_dir($file)) {
                    $packageId = str_replace($modulePath . '/', '', $file);
                    if (!isset($requires[$packageId])) {
                        self::rmdir($file);
                        $event->getIO()->write('Deleted old package ' . $packageId);
                    }
                }
            }
        }
    }