Unable to delete shortened URL's

Hi ,
Describe the bug
We have cron executing https://domain.com/yourls-api.php?signature=&format=simple&action=prune&scope=expired that cannot be executed until an error occurs.
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /var/www/html/includes/vendor/aura/sql/src/ExtendedPdo.php on line 748
The cause for this may be a large number of records.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://domain.com/yourls-api.php?signature=&format=simple&action=prune&scope=expired
  2. See error

Expected behavior
It will remove old links and execute without errors

Actual behavior
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /var/www/html/includes/vendor/aura/sql/src/ExtendedPdo.php on line 748

Thanks for this post, @sudo00.

This seems to be relative to a prune plugin, right?