[GH-ISSUE #11582] issue: Deleting a chat does not delete files uploaded in it #16285

Closed
opened 2026-04-19 22:15:22 -05:00 by GiteaMirror · 4 comments
Owner

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

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

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

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

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

  1. Create a chat and upload a file
  2. Check file presence on backend
  3. Delete chat
  4. File is still present on backend and is using space, but will never be used again.

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.

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 - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### 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 - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### 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 1. Create a chat and upload a file 2. Check file presence on backend 3. Delete chat 4. File is still present on backend and is using space, but will never be used again. 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.
GiteaMirror added the bug label 2026-04-19 22:15:22 -05:00
Author
Owner

@tjbck commented on GitHub (Mar 12, 2025):

Intended behaviour for security reasons.

<!-- gh-comment-id:2717975110 --> @tjbck commented on GitHub (Mar 12, 2025): Intended behaviour for security reasons.
Author
Owner

@le-patenteux commented on GitHub (Mar 12, 2025):

Intended behaviour for security reasons.

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!)

<!-- gh-comment-id:2718095254 --> @le-patenteux commented on GitHub (Mar 12, 2025): > Intended behaviour for security reasons. 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!)
Author
Owner

@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

<!-- gh-comment-id:3215512784 --> @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
Author
Owner

@Classic298 commented on GitHub (Aug 22, 2025):

@le-patenteux reasoning of why this is intended behaviour to be found in my PR desc.

<!-- gh-comment-id:3215513561 --> @Classic298 commented on GitHub (Aug 22, 2025): @le-patenteux reasoning of why this is intended behaviour to be found in my PR desc.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#16285