If you’ve been on Facebook for a while, you’ve probably installed games or given sites permission to log into your Facebook account. You may even use Facebook to log into services like Spotify, Netflix, or Tinder.

But if you’ve been following the news around Cambridge Analytica, the data consultancy firm hired by the Donald Trump campaign for the 2016 US electionthat harvested the dataof up to 50 million Facebook users without their permission through data collected from third-party apps, you may want to know how to make sure that something similar isn’t happening to you.

Here’s what you need to do:

Go to Facebook.com (it’s easier on a computer)

Click the little arrow all the way on the top-right of the screen:

Click on Settings

Look for the Apps button on the menu on the left-hand side of the screen and click on it:

This page will tell you how many other apps have access to all or some of your Facebook data. I had 192 connected apps, and others I’ve seen had a few dozen, and some had over 1,000.

Click the Show All button about halfway down to see every app.

Here’s the fun part: You have to click on the little “x” that appears when you hover over an app to delete each one of them, one-by-one. This will take time.

Start with the apps or sites that you don’t use (or perhaps don’t even remember using—Facebook is 14 years old, after all), and then move on to the newer ones.

Once you’ve spent all that time deleting apps, there’s one more thing you need to do. Below all the apps, you should see a set of four grey boxes. Click on the Edit button for the “Apps Others Use” one:

This very hidden menu actually controls what apps that your friendsinstall can see about you. This is important:When they install apps with very invasive permissions, much like the one at the center of the Cambridge Analytica debacle, those apps can browse Facebook like the user can, seeing what you share with your friends, even though you never consented to let that app (which is acting like an extension of your friend) see and take your information. It turns out I’ve been sharing a bunch of information about myself—much of which would be very useful for people who wanted to build a profile of me to target ads or political messages—without knowing:

Uncheck all the boxes that are checked and press save.

There’s also a nuclear option above this box—the one labelled “Apps, Websites and Plugins”—if you click the Edit button on this one, you have the option to block any app or game from using Facebook. But then if you use Facebook to log into any other service (like Netflix or Spotify, for example), you may lose access. Facebook has inserted itself into the web in such a way that the same ways it’s become so useful to us are the ways it uses us to sell our information. There’s no way to turn one part off without the other.

There’s one more problem with all of this that you probably noticed when you clicked the first app to delete it above. Even if you revoke all these apps from accessing your Facebook account, there’s no way of knowing what data they’ve already harvested, and what they’re doing with it.

Facebook rather flippantly says the apps “may still have the data you shared with them,” and to contact that company to remove the data for you. Even if companies were to actually do that for you (who would you even reach out to ask to delete your data?), this would require as many emails as you have apps installed. And what about the companies or apps that have gone out of business? Did they diligently delete your data as they should’ve before they shut the lights off, or did they sell it to someone to try to make a few bucks?

It’s safe to say that the only surefire way to ensure that you’re no longer being profiled against your will on Facebook is just to delete Facebook entirely (which you can do here)—but how many among us are that strong?

Murphy, Mike. “Here’s how to check which apps have access to your FB account-and delete them” Quartz, March 20, 2018