First,I want to stipulate that changing things ingame with the console can somtimes have very unwanted side effects....but as marriage is a fairly small quest and not conected to any other quests it generally does not have any major adverse effects.
The worst side effects I have had is that you're children will still have the remaks "mama/pappa took me to the market/fishing today".That about all.
If you use a spuse dress -up mod,reversing marriage can have severe adverse effects such as the divorced no longer being a ffollower,no longer being able to interact with them at all and in some casess dissapearing from the game entirely.If you use any sspouse type mod,disable it do a clean save and then use this set of console commands.
Skyrim reads marriage as a 4 part quest.
First,remove any amulet of Marra and remove you're wedding band from you're inventory.Put it in a draw,drop it on the ground,sell it whatever.Also remove the band ffrom you're spouse as well(they will have it for sale in there inventory...nice right!)
open console (~ key)
removefac 51596 (hit enter)
player.removefac c6472 (enter)
resetquest 74793 (enter)
resetquest 21382 (enter)
setstage 74793 10 (enter)
Console commands are not case sensetive,but they are space sensative so please take care of spacing.
You're spouse should then turn to you and act as if they would have prior too marraige..ie:relationship status...liked,loved etc.etc.etc.
You can re-marry youre spouse if you want.They will walk from wherever they are to there old homes so be careful if they are non-essential,as they can get killed walking long distances(don't be anywhere near the area and they will be fine).
Hope I don't get in trouble with mods for this.It just seems to be such a common request.
PS
I do not know a code for resetting adoption.