Everywhere All articles Download Buy — $19

Where apps hide your files

Anki's data folder, explained

Updated 2026-10-28 · 5 min read

Anki stores every deck, card and review in a single collection file inside a per-profile folder in Application Support. Here is where it is, what the other files do, and how to back it up without corrupting it.

The folder

Anki's base folder on a Mac is:

~/Library/Application Support/Anki2

Each profile has its own subfolder named after the profile, for example Anki2/User 1. Inside it:

~/Library/Application Support/Anki2/User 1/collection.anki2
~/Library/Application Support/Anki2/User 1/collection.media/
~/Library/Application Support/Anki2/User 1/backups/

collection.anki2 holds your notes, decks and cards. collection.media holds the audio and images those cards use. This layout comes from the Anki manual and matches the names in Anki's source code. Your profile folder will not be called User 1 if you renamed it.

Open it

Anki's data folder is inside the hidden Library. In Finder press ⇧⌘G and paste the base path. In Terminal:

open ~/Library/Application\ Support/Anki2

To see which profile folders you have, list the base folder (this only reads):

ls ~/Library/Application\ Support/Anki2

What else lives beside your profiles

The base folder also holds program-level files. The preferences database is called prefs.db in the manual, but current Anki's source code names it prefs21.db, so expect that name on disk. Add-ons live in addons21 in the same base folder, and the surest way to reach one is from Anki itself: Tools > Add-ons, select an add-on, then View Files. The manual says not to move or edit the other files in the folder, so leave them alone.

Do not copy it while Anki is open

The manual is firm that you should not copy or move your collection while Anki is running. The collection is a live database, and a copy taken mid-write can be damaged. Quit Anki completely (⌘Q) before copying anything from this folder.

The supported ways to back up

Use Anki's own features first.

  1. Automatic backups. Anki makes periodic backups, and the interval can be changed in Preferences. The default is 30 minutes. Backups are also made when you import a .colpkg, do a one-way sync download or run Tools > Check Database. Older ones are thinned out once they are two days old, and you choose how many daily, weekly and monthly copies to keep.
  2. Export a collection package. File > Export, pick Anki collection package (.colpkg) and tick the option to include media so sounds and images come with it. This single file is the easiest thing to store on an external drive or in cloud storage.
  3. Sync. AnkiWeb sync keeps a copy online, but it is not a backup in the sense of history, since a mistake syncs too.

Restore from a backup

From File > Switch Profile, click Open Backup and choose the backup. Anything you did after that backup is lost, and Anki turns off sync and backups during the restore, so restart it afterwards. A manual .colpkg export is restored with File > Import.

Moving to a new Mac

The tidy route is to export a .colpkg with media, install Anki on the new Mac, and import it. If you prefer to copy folders, quit Anki on both machines and copy the whole Anki2 folder across, so the profile list in prefs21.db comes with the profiles. Check the card count and a few media cards afterwards.

Keeping the data somewhere else

Anki can start with a different base folder. From Terminal:

open /Applications/Anki.app --args -b ~/myankifolder

The manual also lists an ANKI_BASE environment variable, and -p <name> to open a specific profile. This is handy for a second collection or for keeping data on an external drive.

Space

The collection file itself is usually small. Media is what grows, especially with audio and image-heavy decks. Tools > Check Media lists media files no card uses, and files cards refer to that are missing, and lets you delete the unused ones from inside Anki. Use it instead of deleting files from collection.media by hand, which can leave cards with broken references.

Which copy to trust

You may end up with three versions of the same deck: the live collection, automatic backups and a .colpkg you exported last term. The live one changes every time you review a card, so it is always the newest. A backup is a snapshot at a moment in time, and an export is a snapshot you chose. Before restoring anything, copy the current profile folder somewhere safe while Anki is closed, so that a restore you regret can itself be undone.

Also keep in mind that each profile is separate. If a deck seems to be missing after an update or a new install, check File > Switch Profile first, because Anki may simply have opened a different profile with no cards in it.

Why a search does not turn it up

Spotlight does not index ~/Library, so searching for collection.anki2 finds nothing even though it exists.

Finding Anki files at short notice

When a profile will not open and you need the files now, typing collection.anki2 into Everywhere lists the live collection of every profile, and colpkg lists the exports you have saved; any in Documents, Downloads, iCloud Drive or on an external drive appear once it has Full Disk Access, which macOS requires for those places. Press ⌘↵ to reveal the match in Finder. It searches file names only, not the cards inside, and it does not repair or restore anything; it tells you where the file is.

Common questions

Where does Anki store its data on a Mac?

In ~/Library/Application Support/Anki2, with one subfolder per profile containing collection.anki2, collection.media and a backups folder.

Where are Anki backups stored?

In a backups folder inside each profile folder, such as ~/Library/Application Support/Anki2/User 1/backups. Restore one with File > Switch Profile > Open Backup.

Can I copy the Anki folder while Anki is running?

No. The manual says not to copy or move the collection while Anki is open. Quit Anki first, or export a .colpkg from the File menu.

How do I move Anki to a new computer?

Export a collection package (.colpkg) with media from File > Export, then import it on the new Mac with File > Import. Alternatively, sync through AnkiWeb.

Find any file before you finish typing

Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.

Version 2.20.3 · macOS 13+ · 4.7 MB · notarised

Related

© 2026 Caretopia Network Private Limited Everywhere for Mac Buy a licence Articles Privacy Support