How to remove all geolocation info?

How do I remove ALL geolocation information from notes, including previous version and history?

Unfortunately, Joplin records your geolocation for each note by default :poop:

1 Like

there’s no UI button to do that, but I’ll post a SQL statement that will wipe out that data.
I’m not at my computer right now, but I’ll get on that as soon as I am.

Ok, depending on where your profile is, this is the statement that will remove the GPS info:

we assume that you use the default location:

sqlite3 ~/.config/joplin-desktop/database.sqlite "update notes set latitude = 0, longitude = 0, altitude = 0"

@laurent do you think it would make sense to add a button to the settings screen called Remove all location data

This would be a good first issue :wink:

Although there should be a prompt Are you sure

No I don’t think that’s needed. An API is available whenever scripting is needed. By the way running SQL queries directly on the db is not a good idea - for example your query above will fix the notes locally but those changes won’t be synced so they’ll be overwritten when notes are updated on another device.

ok, I thought that those changes will be synced to the target. I’ll check the API to create a proper statement/script.

One issue though: the API requires you to specify a specific note. You can’t say: delete that data for all notes.
So those would be 2 steps: 1) retrieve all note ids 2) loop over those ids and remove the location data

I have the same question (sorry for 'necroposting' :wink:). And another one, too: Is it possible to manually search for notes that contain location data values other than zero?

In one of my clients I must have forgotten to disable "save geo-location with notes" which I normally do by default because it is turned on by default (subject of several threads when I search for "geo-location" on this forum).

By doing some exporting in Markdown format I came across one or two notes with location data. Can't be many - which makes it even harder to locate them...

I added an example using the data API:

Notes:

  • Make a backup before!
  • Not sure if the geolocation is saved in the note history. AFAIK note history can't be accessed via API.
  • Basically it does exactly the two steps described by tessus.
4 Likes

Thanks a lot for your solution - good point about note history, though (set to the default of 90 days in all my clients). Maybe I should make use of DB Browser first and find out how many notes are affected.

And I agree with the other, older threads on the topic: There should be a prompt when setting up Joplin where everyone can decide if it's worthwhile to request and save location data before any notes are created. That would save all who care about the issue the trouble of deleting data not easily accessible.

Maybe the majority of users doesn't care or isn't aware of geo-location anyway. I want to end on a positive note, however: Geo-location is a feature that Evernote was often praised for - and it's a good thing that Joplin doesn't fall short of this capability (all of the above criticism put aside).

2 Likes