How to rebuild route cache programmatically I installed a module quizzard and after uninstallation I am getting this error

Uncaught PHP Exception Symfony\Component\Routing\Exception\RouteNotFoundException: "Route "quizard.quizard_config_form" does not exist." at /home/paddu008/public_html/core/lib/Drupal/Core/Routing/RouteProvider.php line 190


So how do I rebuild route cache programmatically.
If you would like to clear route cache programmatically in drupal 8, use the following:

\Drupal::service('router.builder')-&gt;rebuild();