# Deleting anki-error for macbook

**URL:** https://forums.ankiweb.net/t/deleting-anki-error-for-macbook/16381
**Category:** Help
**Created:** [January 4, 2022, 8:50am UTC](https://forums.ankiweb.net/t/deleting-anki-error-for-macbook/16381 "2022-01-04T08:50:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sp99](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@sp99](https://forums.ankiweb.net/u/sp99)
#### Post date: [January 4, 2022, 8:50am UTC](https://forums.ankiweb.net/t/deleting-anki-error-for-macbook/16381/1 "2022-01-04T08:50:43Z")

</div>

I was trying to delete anki to get the latest version, but when I tried, it gave me an error saying (An error occurred. Please use Tools \> Check Database to see if that fixes the problem.)

It also asked me to copy and paste the information below.

Error  
An error occurred. Please use Tools \> Check Database to see if that fixes the problem.  
If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.  
Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2  
Platform: Mac 10.16  
Flags: frz=True ao=False sv=?  
Add-ons, last update check: 2022-01-04 00:17:53

Caught exception:  
Traceback (most recent call last):  
File “aqt/main.py”, line 1069, in closeEvent  
File “aqt/main.py”, line 463, in unloadProfileAndExit  
File “aqt/main.py”, line 440, in unloadProfile  
File “aqt/main.py”, line 550, in unloadCollection  
File “aqt/main.py”, line 856, in closeAllWindows  
File “aqt/ **init**.py”, line 130, in closeAll  
File “aqt/main.py”, line 548, in before\_sync  
File “aqt/main.py”, line 978, in maybe\_auto\_sync\_on\_open\_close  
File “aqt/main.py”, line 544, in after\_sync  
File “aqt/mediasync.py”, line 123, in show\_diag\_until\_finished  
File “aqt/main.py”, line 541, in after\_media\_sync  
File “aqt/main.py”, line 436, in callback  
File “aqt/main.py”, line 445, in \_unloadProfile  
File “aqt/profiles.py”, line 218, in save  
File “anki/db.py”, line 47, in execute  
sqlite3.OperationalError: attempt to write a readonly database

---

<div class="post-metadata">

### Author: ![BlackBeans](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/blackbeans/32/2283_2.png) [@BlackBeans](https://forums.ankiweb.net/u/BlackBeans)
#### Post date: [January 4, 2022, 6:03pm UTC](https://forums.ankiweb.net/t/deleting-anki-error-for-macbook/16381/2 "2022-01-04T18:03:32Z")

</div>

It seems that the database file only has readonly permission.  
Try going in the directory of the database, and doing executing `ls -l` to ensure if this is true.  
It’s weird that it even worked before you tried to remove anki. Does it work otherwise (writing to the database should happen quite often, not only when you try to delete Anki)?  
This can be caused by several factors, among which:

- you have accidentally manually changed that file permissions
- some program has done this for you (maybe MacOS?)
- your hard disk is starting to die, and thus your OS prevents you to write to it to extend its lifespan to allow you to make a backup

Anyways, if you only want to delete Anki, you just can just remove it by hand ( **warning** : be sure you know what you are doing and have a backup before you screw up your data).

---

<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: [May 1, 2023, 4:37am UTC](https://forums.ankiweb.net/t/deleting-anki-error-for-macbook/16381/3 "2023-05-01T04:37:44Z")

</div>


