11 Harry Potter Universe Fates Worse Than Death
4. Obliviate
Commonly known as the Memory Charm, the Obliviate spell is used erase the memory of the incantation's target and this can be useful for a number of reasons. For example, Hermione utilised the Memory Charm to erase her parent's memory of any trace that she existed to protect them whilst she searched for Horcruxes with Harry and Ron but not every use is with good intentions.
Perhaps most famously, or infamously, Gilderoy Lockhart used the Obliviate spell to wipe the memories of adventuring witches and wizards after they had recounted their stories to him. Lockhart would then write 'autobiographical' books claiming that it was he who had enjoyed glorious adventures and became a celebrity in the Wizarding World through these false claims.
Happily, Karma caught up with Lockhart as he attempted to wipe the memories of Harry, Ron and Hermione after the Basilisk had been put down by Harry himself but Lockhart failed to recognise that Ron Weasley's wand had a tendency to backfire and the charlatan wiped his own memory entirely.
Later seen (in the novels) at St Mungo's Hospital, Lockhart was living a life of total ignorance to his former self and knew only what he had been told by the nurses and other visitors to the wizarding equivalent of a psychiatric ward.
Were it not for these glimpses into his own past, Lockhart would know nothing at all and losing all of one's memories, cherished or otherwise, is a grim fate indeed.