Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to compress the Mail database by running the sqlite3 vacuum command. But I get the following error:

SQL Error: file is encrypted or is not a database

I was running Mac OS 10.6 and I upgraded to 10.7. Now, it's running 10.7.4. I found that the Mail data folder is placed under the folder ~/Library/Mail/V2/MailData instead of ~/Library/Mail/MailData on my machine.

So I use the following command:

sqlite3 ~/Library/Mail/V2/MailData/Envelope\ Index vacuum

share|improve this question

You should just move that file to trash and re-start Mail.

There is a 'PRAGMA integrity_check' option, but why risk a bad index, the file will be rebuilt when Mail senses it's missing.

share|improve this answer
Thanks bmike. My question is actually a few month old but what you told is actually what I did at the end. – Helium Mar 1 '13 at 23:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.