The cleanest way would be to backup your saves, restore the clean nand, and start from scratch creating the emunand, installing CFW, installing the sigpatches, reinstalling your games and restoring your saves.
If you use kosmos they have a guide here: switch.hombrew.guide
If you use atmosphere...