# Collection.anki2 vs collection.anki21?

**URL:** <https://forums.ankiweb.net/t/collection-anki2-vs-collection-anki21/34199>\
**Category:** Help\
**Created:** [September 12, 2023, 2:56am UTC](https://forums.ankiweb.net/t/collection-anki2-vs-collection-anki21/34199 "2023-09-12T02:56:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![potnisanish](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@potnisanish](https://forums.ankiweb.net/u/potnisanish)\
**Post date:** [September 12, 2023, 2:56am UTC](https://forums.ankiweb.net/t/collection-anki2-vs-collection-anki21/34199/1 "2023-09-12T02:56:07Z")

</div>

I was trying to access the \*.apkg sqlite database with python, and noticed when opening it as a \*.zip that there’s both a collection.anki2 and collection.anki21 file. Can I just use the \*.anki21 file and ignore the other?

The doc page says for user profiles, “Your notes, decks, cards and so on in a file called collection.anki2.”

Just wanted to understand if there’s any other dependency between the two files or if it’s fine for me to just use the \*.anki21 file.

Thanks.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [September 12, 2023, 5:07am UTC](https://forums.ankiweb.net/t/collection-anki2-vs-collection-anki21/34199/2 "2023-09-12T05:07:47Z")

</div>

Please see [Command-Line Use - Writing Anki Add-ons](https://addon-docs.ankiweb.net/command-line-use.html)

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [September 12, 2023, 6:35am UTC](https://forums.ankiweb.net/t/collection-anki2-vs-collection-anki21/34199/3 "2023-09-12T06:35:21Z")

</div>

(to read an .apkg file, you can create an empty collection and then call `col.import_anki_package()`)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [October 12, 2023, 6:35am UTC](https://forums.ankiweb.net/t/collection-anki2-vs-collection-anki21/34199/4 "2023-10-12T06:35:51Z")

</div>

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