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