An engramatic purge or engramatic extraction was a medical procedure used by the Mari which could erase memory engrams, remove certain images, and/or modify behavior. It carried some risk of neurological damage.
In 2374, Lieutenant B'Elanna Torres was arrested by the Mari for having violent thoughts. The sentence to be carried out against her was an engramatic purge of those violent thoughts. Fortunately, Lieutenant Commander Tuvok was able to prevent the procedure from being carried out by proving Torres's innocence, with The Doctor subsequently managing to repair the minor neurological damage that Torres had sustained before Tuvok had been able to produce his evidence. (VOY: "Random Thoughts")