Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

George12's avatar

Class 'Barryvdh\Debugbar\ServiceProvider' not found

I tried to remove the laravel DebugBar package and now all I get is this error. All I have done is remove the line from the composer and run composer update.

[Symfony\Component\Debug\Exception\FatalErrorException] Class 'Barryvdh\Debugbar\ServiceProvider' not found

I removed the class from the app/config and even when I try to run the command php artisan clear-compiled I get the same error. I also tried composer update, composer install(after deleting vendor folder)

Any ideas?

0 likes
3 replies
bobbybouwmann's avatar

Are you sure you are not using the package by hand somewhere? It sounds like it's still being called in some kind of service provider

mathias87's avatar

Hey, I had the same problem and resolved it:

  • remove Debugbar entries in config/app.php (serviceprovider and alias)
  • type composer remove barryvdh/laravel-debugbar
  • delete the bootstrap/cache/config.php (was created by executing php artisan config:cache)
  • composer update
6 likes
Khalid Uris's avatar

You have run composer update barryvdh/laravel-debugbar followed by composer dump-autoload.

Please or to participate in this conversation.