Extra '.obsidian' directory?

I’m looking at the on-disk structure of an Obsidian vault, and I just found a .obsidian/ directory within a sub-directory in one of the vaults. The files in the vault have timestamps from 2023-12, so it looks like those files aren’t actually doing anything, and could be removed.

This particular vault is one that was copied and modified by hand (not using the Obsidian program itself), so it’s entirely possible that this directory exists due to a typo somewhere along the line, so … my question is this.

Does Obsidian ever create .obsidian/ directories anywhere other than at the “root” of a vault?

TL;DR, you can move it out of your vault and delete it after a bit if you don’t encounter any issues.

I can think of two possibilities:

  • It was unintentionally moved or copied in there (unlikely, but possible).
  • The folder that’s it’s in was opened as a vault at sometime in the past. Obsidian would then create an .obsidian/ folder in there.

Not saying this is your case, but for example, I see this every few weeks with folks using iCloud Drive. User creates a new vault in iCloud Drive first on iOS. Obsidian creates the Obsidian/ main folder and new vaults are created and stored in iCloud Drive/Obsidian/{VAULTNAME}/. All good.

.
└── iCloud Drive/
    └── Obsidian/
        └── MyVault/
            └── .obsidian/

User then, on macOS, opens the Obsidian main folder as a vault instead of the MyVault folder:

.
└── iCloud Drive/
    └── Obsidian/
        ├── .obsidian/
        └── MyVault/
            └── .obsidian/

Confusion ensues as notes are syncing (with the extra MyVault folder), but settings, themes, and plugins aren’t syncing between iOS and macOS because different settings folders are being used as the path is wrong.

Moving it out of the repo is the plan, I guess I just wanted somebody to point out if there were any cases where Obsidian might put a .obsidian/ directory somewhere other than the root of the vault.

I’m not using iCloud to sync, however I can see where the problem you pointed out might happen. When creating a new vault, it isn’t clear that the directory you select with the OS “select directory” dialog is the parent of the new vault, rather than the root of the new vault.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.