NMR tubes are hard to clean because of their small bore. They are cleaned best before the sample has dried.
Cleaning is performed usually by rinsing with the same (non-deuterated) solvent used to dissolve the initial sample. Dichloromethane or acetone are good choices because dichloromethane is similar in polarity to chloroform, a common NMR solvent, while acetone dissolves many organic compounds. Sonication and scrubbing with a pipe cleaner may be helpful in removing traces of solid contaminants. If necessary, the tube may be filled with an oxidizing solution of aqua regia or piranha solution (HO/HSO). Care should be taken with these solutions, as they can unexpectedly and violently erupt from the NMR tube due to pressure build-up (aqua regia) or explosion (piranha). Chromic acid solutions are never used, due to traces of paramagnetic chromium left behind on the tubes causing interference with NMR experiments.
When the NMR tube is determined to be clean, it is triple-rinsed with distilled water and left to air-dry or dry in an oven at low temperature. It is best not to exceed 60 °C. At higher temperatures, slight tube distortion can occur which will affect tube camber. If NMR tubes are washed, a final rinse is recommended with a solvent that easily evaporates at 60 °C and that has no residue such as methanol.  Avoid acetone, which leaves a residue.