ollama - 💡(How to fix) Fix Delete all history button [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15099Fetched 2026-04-08 01:41:23
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
commented ×2closed ×1labeled ×1mentioned ×1
RAW_BUFFERClick to expand / collapse

Is there a way to easily delete all current chat histories without having to right click each of them and then select Delete?

If I delete the AppData\Local\Ollama\db.sqlite (under Windows) all of the history is deleted, but it also deletes all settings.

extent analysis

Fix Plan

To delete all chat histories without removing settings, we can create a script to directly interact with the SQLite database.

Steps

  • Stop the Ollama application to ensure the database is not in use.
  • Use a SQLite client or a programming language like Python to connect to the database.
  • Execute a query to delete all chat history records.

Example Code (Python)

import sqlite3

# Connect to the database
conn = sqlite3.connect('AppData\\Local\\Ollama\\db.sqlite')
cursor = conn.cursor()

# Delete all chat history records
cursor.execute('DELETE FROM chat_history')

# Commit changes and close the connection
conn.commit()
conn.close()

Replace 'AppData\\Local\\Ollama\\db.sqlite' with the actual path to your database file.

Verification

After running the script, restart the Ollama application and verify that all chat histories have been deleted while settings remain intact.

Extra Tips

  • Make sure to backup your database before making any changes.
  • If you're not comfortable with scripting, consider using a graphical SQLite client like DB Browser for SQLite to execute the delete query.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING