Notes app keeps deleted folders stored, but not visible. How to delete them? [SOLVED]

I’m using an Obsidian plugin that imports Apple Notes and it accesses this folder to grab all notes:
~/Library/Group Containers/group.com.apple.notes

I only have these 2 folders on my Notes app:
image

But when I use the plugin it imports all of these folders that are obviously folders I created in the past and deleted them, but for some reason Notes still has them saved somewhere, even though they are not visible in the app, but the Obsidian plugin is reading some file in that ~/Library/Group Containers/group.com.apple.notes folder that still contains that information.

How can I completely delete these entries?
I’m guessing that if the plugin is able to access this information, so can I?
I’m not an expert when it comes to this, so if you know how to do it, take that into consideration :wink:


EDIT: Found the solution. Here it is:

If you show hidden files and folders in Finder (cmd-shift-.), you may be able to look around and find the folders, then delete them. But be careful not to inadvertently delete any folders or files you may need later.

I already have it enabled, but the folders are not Finder folders. They are most likely saved inside a file. For example the “Journal” folder that I see in both Notes and Obsidian, is not a Finder folder I can just “delete” manually.

This seems like some sort of database or something, but when I open the sqlite file I can’t seem to find anything related to them…

Hmm. Hopefully someone who knows more about Apple Notes than I do will jump in and help you. Sorry!

Someone who knows enough javascript might be able to look at the source code of the Obsidian exporter utility (which iirc is open source) and figure out what it’s doing and where it’s grabbing the folders from.

1 Like

You might ask on the Obsidian Discord in the plugins section.

That gave me an idea… I actually have the .js file used by the plugin and there’s only 2 entries there that point to that folder. One of them is just a normal text
message:'Select the "group.com.apple.notes" folder to allow Obsidian etc etc etc

The other one is:
var Ra="Library/Group Containers/group.com.apple.notes",Hp="NoteStore.sqlite",Ng=978307200,b etc etc etc…

So maybe that means that the info comes right from that NoteStore.sqlite, which is the one I was looking at. Now the issue is that when I open it and try to find for example “Audio Programmer” which is the name of one of the folders, I can’t find it. At the same time, there are thousands of rows and all that, so maybe it’s there, but I can’t find it.

But that’s a good thing that you pointed out the JavaScript, because maybe that’s exactly the file I need to look at, the NoteStore.sqlite

Thanks!

1 Like

Ok I did it!!!
Using that .js file I looked for that folder as I said and then below that I saw a few things that I remember seeing in the database file such as

Then went to the app again and found this:

And…

Deleted all of those rows, saved the file and now:
image

:slight_smile:
Thank you so much for your help. That JavaScript comment really helped! :raised_hands:

1 Like

That’s such a big difference from Obsidian, where all your data is sitting right there in system folders.

Glad I could help even in a small way.