When removing an email account in the cPanel user interface, you encounter an SQLite error where SQLite cannot find the table annotations, but you still see the email account was removed from the interface.
Error: The system received an error from “SQLite”: SQLITE_ERROR (no such table: annotations)
When the SQLite database for the subaccount is corrupted or missing tables, the above error will be produced. If you navigate to the "User Manager" section within the cPanel account, and this fails to load any users, this is further signs the database will need to be recreated.
- Create a backup directory in root or the user's home folder.
- Move the existing SQLite database for the subaccount to the newly created folder.
mv -v /home/$user/.subaccounts/storage.sqlite ~/sqlitebackup/
- Run the upgrade script for the subaccount database.
/scripts/upgrade_subaccount_databases --user $username
- Next, navigate to the Users Manager page to populate the database.
- When the page is loaded, you can verify the database with the sqlite3 command.
annotations meta users
- The email account page will now successfully remove the accounts without producing an error.