import sqlite3 import os db_path = os.path.join("chromadb-store", "chroma.sqlite3") # adjust if different if os.path.exists(db_path): conn = sqlite3.connect(db_path) conn.execute("VACUUM;") conn.close() print("✅ Vacuumed Chroma SQLite DB — space reclaimed.") else: print("⚠️ No chroma.sqlite3 found — skipping vacuum.")