The #untrap extended command will attempt to disable an adjacent trap if it can be disabled. This has a special interaction with pits, bear traps and spider webs, as it will instead attempt to help out any monster trapped in one, which may result in said monsters becoming peaceful. It is a good idea to untrap your pet should it fall victim to a beartrap or other trap. Lawful characters occasionally get a +1 alignment bonus for helping monsters out of a trap ("You feel that you did the right thing.") Attempting to help a footrice this way without wearing gloves will cause you to be petrified. When attempting to #untrap a squeaky board, the player will be asked for an item to apply, for which the intended response is a potion of oil or a can of grease with charges. Successfully untrapping a land mine or bear trap will recover a trap object that can later be applied by the player. Untrapping an arrow trap or dart trap will recover the appropriate type of projectiles. Many traps cannot be disarmed directly with this command; instead, it often suffices to dig a pit to replace it (if there is not already one there) and fill the pit.
Attempting to #untrap a door will cause you to search the door for traps, after which you will be asked if you want to attempt to disarm it.
The command can also be used to detect or remove a container trap.