Breaking up is hard to do. It’s even harder in the age of the Internet and social media. Many former spouses, partners, boyfriends and girlfriends now seek digital revenge.

This could be done by posting fake messages on the ex’s social media, or even posting intimate photos and messages for everyone to see. Some people go to great lengths to destroy their ex’s reputation.

It doesn’t help that people leave themselves wide open for attack. A recent survey conducted by online security firm McAfee revealed that more than 50 percent of people share account passwords with their partner. Plus, 1 in 3 surveyed saw nothing wrong with sending their partner racy images.

Here’s why that’s a spectacularly bad idea: The survey also found that 28 percent of people who have sent intimate photos or videos have regretted doing so. One in 10 say an ex has threatened to post racy images online. Also, 84 percent have had to change passwords after breakups.

Protect yourself

What can you do to protect yourself when it looks like you’re headed for a breakup?

First, change the passwords for all your social networking accounts. If your ex knows those and gets in first, he or she can change your passwords and block you out.

A vengeful ex could then start posting nasty things under your profile. Cleaning it up isn’t easy.

Go to http://bit.ly/1UbbU for a tip on how to stop this.

Once the breakup is official, you probably won’t want to see your ex popping up all over your Facebook and Twitter feeds, or to give them the opportunity to post on your profile.

Go into your accounts and block the ex. Here’s how to make sure your Facebook privacy controls are set the way you want, www.facebook.com/help/325807937506242/.

If your ex knows the passwords for any of your email or financial accounts, be sure to reset those, too! You probably should anyway, as partners often know more than you think.

New email, passwords

It might be best to start fresh with a new email account at Gmail or Yahoo! Those email providers make it easy to transfer your address book and update all your friends and family members.

Set a new password or PIN code for your computers and gadgets.

Go to https://www.lookout.com/ for the top security apps for your smartphone and tablet.

Make sure the app includes a tracking feature that allows you to remotely wipe information if either is stolen.

Remember to create strong passwords. That means avoiding using words and numbers that you used during the relationship.

If you need help thinking up tough passwords that are easy to remember, go to http://bit.ly/b1aIqD.

Delete and transfer

Delete any revealing photos, intimate text messages and email from your computer and gadgets.

If you share a computer with your partner, transfer your personal photos, music and important project files to an external hard drive or a private cloud-based storage account.

Then, follow these steps at http://bit.ly/12JDiyU to permanently erase it from the machine.

Taking these steps will help secure your privacy and personal information.

Racy photos

Unfortunately, there isn’t much you can do if you have sent your ex racy photos or steamy texts. Once you hit the send button on an email or text, it’s out of your hands and out of your control.

A private video or photo shared with even one other person by a vengeful ex can quickly spin out of control and be seen by thousands in a few hours.

Once it’s out there, you can’t take it back.

It’s always in the best interest of both parties, for security and emotional reasons, to end things amicably.

When the next Mr. or Ms. Right comes along, keep your passwords to yourself. Sharing passwords has nothing to do with trust or commitment.

Any loving relationship can survive a few meaningful boundaries.

Kim Komando hosts the nation’s largest talk radio show about consumer electronics, computers and the Internet.

Hear it locally at 94.3 WSC News Radio noon-3 p.m. Sundays. For more information, go to www.komando.com.