Deleting telescope entries Laravel 8

Viewed 1782

i have telescope in my laravel setup, i forgot that i have it and forget to prune it daily. so it accumulated a huge data already it has 28million entries and it is taking 30GB worth of space.

I tried to use both php artisan telescope:clear and php artisan telescope:prune commands but I was having a timeout error because of the large dataset.

Can anyone help me how to clear laravel telescope? Thank you in advance

2 Answers

three tables that handle telescope operations namely —  telescope_entries, telescope_entries_tags, and telescope_monitoring

in your database run these queries to empty tables

TRUNCATE TABLE telescope_entries;
TRUNCATE TABLE telescope_entries_tags;
TRUNCATE TABLE telescope_monitoring;

You can first run php artisan telescope:clear and then optimize the telescope_entries table optimize table telescope_entries; As you have lot of data it might take some time to process.

Related