An engramatic purge is a medical procedure used by the Mari which can erase memories, remove certain images, and/or modify behavior. It carries 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")