First of all:
Uninstalling custom firmware has no benefits at all, does not solve any problems and removes all tools to solve problems.
Having that said: Luma v6.6 means you are probably using A9LH.
You should upgrade your CFW installation to B9S. Then –
if you insist on uninstalling for whatever reason – you can use the uninstall option of the GodMode9 MegaScript.
A9LH to B9S – or –
A9LH to B9S [French Version]
Uninstall CFW – or –
Uninstall CFW [French Version]

Do not skip the safety test.
Do not uninstall CFW if the Home Menu does not load in the test.
If you are currently not using A9LH but "Menuhax"
this should be enough to remove it – this was long before I started using hacks on the 3DS, so I'm not sure.