mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #11582] issue: Deleting a chat does not delete files uploaded in it #31814
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @le-patenteux on GitHub (Mar 12, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11582
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.5.20
Ollama Version (if applicable)
No response
Operating System
Ubuntu 22.04
Browser (if applicable)
Brave, Chrome, Firefox
Confirmation
README.md.Expected Behavior
When deleting a chat where files were uploaded as context, I would expect the files to be also deleted in the backend.
This is important to save space on the server in the long run.
Actual Behavior
Deleting the chat does not delete the files, they are still there on the server, but not referenced anywhere on the UI
If I delete files individually, it works, they disappear. When deleting the chat, they remain on the server.
Steps to Reproduce
Additional steps tested:
5. Delete the file with the little "x"
6. File is now gone, that is fine!
Logs & Screenshots
There is no relevant screenshot to share here
Additional Information
Thank you for your amazing work in making LLMs accessible.
@tjbck commented on GitHub (Mar 12, 2025):
Intended behaviour for security reasons.
@le-patenteux commented on GitHub (Mar 12, 2025):
Care to explain? What is the security issue? (asking for real, I don't understand)
Also, this will become a huge issue as the instance ages... Hundreds of stale files will remain on the server ant take-up all space...
Other avenue:
Is there a function to delete un-referenced files? If not, could it be a feature request that would be interesting? (for me it is!)
@Classic298 commented on GitHub (Aug 22, 2025):
Hello everyone.
I worked on a PR related to this issue.
Testing wanted!
https://github.com/open-webui/open-webui/pull/16520
@Classic298 commented on GitHub (Aug 22, 2025):
@le-patenteux reasoning of why this is intended behaviour to be found in my PR desc.