How to fix? SQLite corrupt, so Meteor CLI is broken

Right now, running locally, every action from the Meteor CLI in OSX throws this exception:

> /Users/mallorym/.meteor/packages/meteor-tool/. throw(ex);

> Error: SQLITE_CORRUPT: database disk image is malformed

>  at Object.Future.wait (/Users/mallorym/.meteor/packages/meteor-tool/.
>     at runOnce (/Users/mallorym/.meteor/packages/meteor-tool/.

If I understand, this means that the package manager uses SQLite, but mine is broken somehow :frowning:

You can see where Meteor package manager / CLI uses SQLite here.

How to fix? Can I use the SQLite CLI to reset somehow?

Thanks so much to anyone who helps. :cat2:

1 Like

rm -rf ~/.meteor and there you go. :slight_smile: Running meteor again will just regenerate that folder again anyway, so you’re not really losing anything important.


It appears I am having a similar problem. Can you help me with the current version of meteor?

throw error;
Error: SQLITE_CORRUPT: database disk image is malformed

c:\Projects\games\mrhobs>rm -rf ~/.meteor
’rm’ is not recognized as an internal or external command,
operable program or batch file.

Have you tried uninstalling meteor from the control panel -> Programs and Features?

If you want to try deleting the Windows equivalent of ~/.meteor, you would delete like this from the command line:

del %USERPROFILE%\AppData\Local\.meteor

Alternatively you could use Windows Explorer to delete .meteor from your AppData\Local folder.

Note that you will need to re-install meteor afterwards.

Please take a look over here:

Using sqlite3 you can repair the DB.

cd ~/.meteor/package-metadata/v2.0.1
sqlite3 .dump > backup
sqlite3 < backup
rm backup

Essentially, even though the DB reports as corrupt. The SQLite tool can dump it and then recreate it.


Not that this isn’t nice and all but I’m always wondering
a) how you guys are finding these threads from years back and
b) why you bother replying to them?

Google search turns it up.
why bother replying? It is still an issue that still happens in some circumstances.
It just happened to me and I found this less intrusive solution that maybe others would benefit from.