Search code examples
pythonpipdelete-file

What is pip-delete-this-directory.txt? Can I delete this file?


If I install a pip package via:

pip install -e -e git+https://example.com/repos/foo#egg=foo

a file called pip-delete-this-directory.txt gets created.

Can I delete this file, or would doing that break something?

Where is the canonical reference/documentation for this file?


Solution

  • I found a sample of a pip-delete-this-directory.txt which contains the following lines:

    This file is placed here by pip to indicate the source was put here by pip.

    Once this package is successfully installed this source code will be deleted (unless you remove this file).

    And the upvoted response of this question: Pip creates build/ directories, reinforces my believe that nothing will get broken if you delete this file, but the source code of the module you installed will remain on your computer and take up space. If that is not a concern for you then you don't need to delete it!