In NetHack, the mighty scroll of genocide will eradicate one species of monster from the game -- you'll never have to worry about running into one again. The blessed version is even better, as it allows you to eliminate an entire class of monsters, i.e. all those represented by any one symbol. I usually hang on to my scrolls of genocide until I can bless them. They are rather rare and are by far the most charge-expensive scroll to write with a magic marker.

Popular targets for genocide include:

Popular targets for blessed-genocide include: Some creatures cannot be genocided. These include elementals and demons (anything represented by E or &, respectively), shopkeepers, and the Wizard of Yendor. If you attempt to genocide something ungenocidable, you will get the message "No, mortal! That will not be done!" You get three tries to name a legal target for genocide, or else the scroll is wasted.

Genociding your own race (usually @) will kill you, even if you are polymorphed into something else. Not advisable.

Genociding trolls can crash the game due to bugs in NetHack version 3.3. Until this is fixed, avoid attempting this unless desperate. The problem stems from the fact that trolls can come back to life at intervals, so genociding them when there are troll corpses lying around which later attempt to come back to life creates big problems.

In your eagerness to genocide mind flayers, make sure you're not a dwarf or gnome first.

I almost forgot: a cursed scroll of genocide summons several monsters of the type named. Considering what monsters players usually want to genocide, this is very, very bad. If using this scroll was an act of desperation, your doom is very likely sealed at this point.