A solution to come over this problem is to run:

echo .dump | sqlite repository > dump.sql

then edit dump.sql to delete SQL statements from ANALYZE sqlite_master; to last INSERT INTO sqlite_stat1

then rm repository && sqlite repository < dump.sql