Your mobile apps may be tracking your every move, from where you sleep, to the doctor’s office to your workplace, the New York Times found in an investigation.

“At least 75 companies receive anonymous, precise location data from apps whose users enable location services to get local news and weather or other information," according to the New York Times article. This location information is used “to cater to advertisers, retail outlets and even hedge funds seeking insights into consumer behavior,” the Times wrote.

So if you don’t want your apps spying on your location, and sometimes collecting this data thousands of times a day, here’s how the Times advises you to opt out.

iOS users

If you have an iPhone, the most direct way to check which apps have access to your location services, and how much access, is to go to “Settings” and then “Privacy.” Once you tap “Privacy,” you should see “Location Services” listed at the top. After tapping that, you will be able to see all your apps and your corresponding locations setting.

You can disable all location services, but that may prevent you from using select app features, the Times reports, “such as finding yourself on a map.”

If you want to look through how each app tracks your location and adjust your settings, here is what each option means: Selecting “Never” that means the apps will be blocked from tracking you. “While Using” means the app will have access to your location only while you are using it. "Always means your apps can track your location at any time, even if you are not using it.

Android users

Android users can select “Security &locations” from the phone’s settings page. Then tap “Location” in the “Privacy” section and select “App-level permissions.” This will allow you to see a list of apps and the toggle that shows which apps have permission to track your location.

“Unlike iPhones, Android phones don’t allow you to restrict an app’s access to your location to just the moments when you’re using it," the Times notes. "Any app on Android that has your permission to track your location can receive the data even when you’re not using it.”

Click here for additional instructions from Google.