Memory exhaust error when deploy

Hello,
most probably i’ve a loop error with a template and when try to deploy i’ve this error.
I’ve various deploy in pending and for anyone can see the revert option but not for the first to deploy where i see the memory exhaust error.
How can i delete from db that deploy? Is it possible?
In attach to describe better what i say

The deploy above is normal