Rebuild the database file and reclaim free space.
Section: Backup and maintenance
Run VACUUM
sql
sql
VACUUM;Explanation
Can reduce file size after large deletes or schema churn.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Backup and maintenance
Create a compact backup with VACUUM INTO
Write a fresh copy of the database to a new file.
Run an integrity check
Verify the database structure and content consistency.