🔥 Fix Codeium Taking Too Much Space on Ubuntu (VS Code Users Must Read)

🔥 Fix Codeium Taking Too Much Space on Ubuntu (VS Code Users Must Read)

🚀 Introduction

If you're using Codeium on Ubuntu with VS Code, chances are you've noticed a surprising storage spike. What’s happening? Codeium stores local AI model embeddings — and over time, these files can swell to gigabytes of data.

In this guide, I’ll walk you through exactly how to clean it, keep using Codeium smoothly, and even automate the cleanup to avoid problems in the future.

📦 Why Is Codeium Using So Much Space?

Codeium stores data under:

~/.codeium/database/

This includes embedding_database.sqlite, which can grow over 8–9 GB or more, especially if you're coding daily.

🔍 Step 1: Check Codeium Storage Size

Open a terminal and run:

du -ah ~/.codeium/database | sort -hr | head -n 20
You'll likely see something like this:
8.9G ~/.codeium/database/.../embedding_database.sqlite

🧹 Step 2: Clear the Heavy Database File

You can safely delete the embedding database. Codeium will rebuild it as needed.

rm -rf ~/.codeium/database/9c0694567290725d9dcba14ade58e297
Replace the folder name above with the one you see from your du output.

🔁 Step 3: Automate the Cleanup (Weekly)

Instead of cleaning manually, let’s automate it.

1. Create a script:
nano ~/codeium-clear.sh

Paste:

#!/bin/bash rm -rf ~/.codeium/database/9c0694567290725d9dcba14ade58e297
Again, adjust the folder path to your actual one.

Save and exit:
Press Ctrl + O, then Enter, then Ctrl + X.

2. Make it executable:
chmod +x ~/codeium-clear.sh
3. Schedule with cron:
crontab -e

If prompted, choose nano.

Add this line to run the script every Sunday at 1:00 AM:

0 1 * * 0 /home/isc-kfc/codeium-clear.sh

Save and exit.


✅ Optional: Test It Immediately

bash ~/codeium-clear.sh
du -sh ~/.codeium/database

🎯 Final Tips

  • This won't break Codeium.

  • Codeium will regenerate only what it needs.

  • You can update the script to include logging or only clear if the folder is too big.


🙌 Conclusion

If you're a developer relying on Codeium daily, this fix is a lifesaver. Stop wasting disk space and automate the cleanup. More efficient dev = happier coding!

💡 Pro tip: Bookmark this guide or share it with your team!

Isaac Talb

Startup Co-Founder | Software Engineer

Leave a Reply

Your email adress will not be published, Requied fileds are marked*.