|Will be confiscated|
You can flush it with other items in the toilet to cover up your tracks. Dirt is not used in any crafting recipes. Like the Wall Block, if a guard finds dirt from you anywhere in the prison you will be sent to solitary, even if you put it in an inmate's desk.
Dirt cannot be dropped in underground tunnels, so the best option is to dispose of it and never take it from an inmate's desk. It can be flushed down the toilets, (optimally someone else's) or given to an inmate. It won't raise their opinion of you, but the dirt will disappear and you will never have to worry about it again. If you get beaten up and sent to the infirmary, the dirt will also disappear, like all contraband. Alternatively you can store it, but keep in mind that it can't be stored in underground tunnels and it wastes valuable space and risks you being sent to solitary. Dropping dirt in front of a guard will also send you to solitary.