KB original file dont delete #4096

Closed
opened 2026-02-21 18:04:44 -05:00 by yindo · 3 comments
Owner

Originally created by @zyc130130 on GitHub (Jun 14, 2024).

Originally assigned to: @JohnJyong on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.9

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Delete the knowledge base files, but the original files are still present in the "docker" directory under the "volumes" section.

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @zyc130130 on GitHub (Jun 14, 2024). Originally assigned to: @JohnJyong on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.9 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Delete the knowledge base files, but the original files are still present in the "docker" directory under the "volumes" section. ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:04:44 -05:00
yindo closed this issue 2026-02-21 18:04:44 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 14, 2024):

Hey @zyc130130! I'm here to assist you with any bugs, questions, or contributions. Feel free to ask for help while we wait for a human maintainer.

To ensure that knowledge base files are completely removed from the "docker" directory under the "volumes" section when you delete them in Dify version 0.6.9, you need to manually delete the corresponding files from the mounted volume directory on the host machine. The relevant volume for storing user files is defined in the docker-compose.yaml file as follows:

volumes:
  # Mount the storage directory to the container, for storing user files.
  - ./volumes/app/storage:/app/api/storage

This means that the files are stored in the ./volumes/app/storage directory on your host machine. To completely remove the knowledge base files, you should delete the files from this directory.

Here is a step-by-step guide:

  1. Navigate to the volumes/app/storage directory on your host machine.
  2. Identify and delete the specific knowledge base files you want to remove.

For example, you can use the following command in a Unix-based system to delete a specific file:

rm ./volumes/app/storage/path/to/your/knowledge_base_file

Or to delete all files in the storage directory:

rm -rf ./volumes/app/storage/*

Make sure to replace path/to/your/knowledge_base_file with the actual path to the file you want to delete [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jun 14, 2024): <!-- Greeting --> Hey @zyc130130! I'm here to assist you with any bugs, questions, or contributions. Feel free to ask for help while we wait for a human maintainer. <!-- Answer --> To ensure that knowledge base files are completely removed from the "docker" directory under the "volumes" section when you delete them in Dify version 0.6.9, you need to manually delete the corresponding files from the mounted volume directory on the host machine. The relevant volume for storing user files is defined in the `docker-compose.yaml` file as follows: ```yaml volumes: # Mount the storage directory to the container, for storing user files. - ./volumes/app/storage:/app/api/storage ``` This means that the files are stored in the `./volumes/app/storage` directory on your host machine. To completely remove the knowledge base files, you should delete the files from this directory. Here is a step-by-step guide: 1. Navigate to the `volumes/app/storage` directory on your host machine. 2. Identify and delete the specific knowledge base files you want to remove. For example, you can use the following command in a Unix-based system to delete a specific file: ```sh rm ./volumes/app/storage/path/to/your/knowledge_base_file ``` Or to delete all files in the storage directory: ```sh rm -rf ./volumes/app/storage/* ``` Make sure to replace `path/to/your/knowledge_base_file` with the actual path to the file you want to delete <sup>[[1]](https://github.com/langgenius/dify/blob/main/docker/docker-compose.yaml)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@JohnJyong commented on GitHub (Jul 1, 2024):

mark it to the feature list

@JohnJyong commented on GitHub (Jul 1, 2024): mark it to the feature list
Author
Owner

@JohnJyong commented on GitHub (Jul 2, 2024):

@zyc130130 it has fixed, pr below:
https://github.com/langgenius/dify/pull/5882

@JohnJyong commented on GitHub (Jul 2, 2024): @zyc130130 it has fixed, pr below: https://github.com/langgenius/dify/pull/5882
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4096