Files in `.ipfs/filestore` directory

I am using Kubo in docker and found that the ipfs data directory (the one that usually is under ~/.ipfs) contains a directory filestore and inside there is a copy of one of the directories i have pinned. Now I have some data duplicated because I have a copy of the exact same directory somewhere else.

  • How did this happen? Under what circumstances does ipfs create this directory?
  • How do I get rid of the directory? Can I just delete it or will this upset ipfs?
  • Is there a way to find the location on disk of a CID?

I found out something: In order to find where a CID in the filestore is in disk you can do

ipfs filestore ls

paths are a bit weird, they start with filestore and then I have both directories overlaid (everything under $ipfs_staging as well as under $ipfs_data/filestore).