We live in a very technologically advanced country — and married couples tend to mingle their electronic accounts just as freely as they do their physical possessions.

That can be a big problem when you’re headed for a split. Once you’ve made the decision to divorce, you need to take some immediate steps to protect your digital life:

1. Change every password

Don’t bet that your spouse doesn’t know your passwords to all your accounts — or can’t guess them. You should promptly make a list of all your social media accounts, emails, websites, blogs, bank accounts, online payment sites (like PayPal), auction sites (like eBay), shopping sites (like Etsy and Amazon) and entertainment sites (like iTunes, Amazon Prime, Hulu and Netflix).

Change the passwords to all of them. The best password should be something random that your spouse won’t associate with you in any way and includes both numbers and symbols.

2. Factory reset all electronic devices you turn over

If your spouse is getting custody of the computer in the breakup or you’re turning over the iPhone you used because it technically belongs to your spouse’s account, copy all the information you want off the device first and then factory reset it.

Merely deleting information isn’t a safe option because there are plenty of programs that can retrieve deleted information.

3. Create some new social accounts

Yes, you already changed the passwords on the old ones — but it’s still time to make them inactive and private. Delete everyone off your friend’s list so that no one can access the old site but you. This way you can preserve your memories without worrying about being spied on.

Consider leaving social media alone until after your divorce so that you don’t say or post anything that could be problematic. If that’s not an option, create all new accounts and hand out information about them very carefully.

If you’re going through a difficult divorce, make sure that you get experienced guidance throughout the process.