Skip to content

Commit 31110f3

Browse files
Add docs for how to clear out the Poetry wheel cache (#18283)
As shared by @reivilibre, #18261 (comment) Relevant Poetry issue around how this should be handled by them: python-poetry/poetry#10304
1 parent 5e83434 commit 31110f3

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

changelog.d/18283.doc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add docs for how to clear out the Poetry wheel cache.

docs/development/dependencies.md

+22
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,28 @@ $ poetry shell
150150
$ poetry install --extras all
151151
```
152152

153+
If you want to go even further and remove the Poetry caches:
154+
155+
```shell
156+
# Find your Poetry cache directory
157+
# Docs: https://github.com/python-poetry/poetry/blob/main/docs/configuration.md#cache-directory
158+
$ poetry config cache-dir
159+
160+
# Remove packages from all cached repositories
161+
$ poetry cache clear --all .
162+
163+
# Go completely nuclear and clear out everything Poetry cache related
164+
# including the wheel artifacts which is not covered by the above command
165+
# (see https://github.com/python-poetry/poetry/issues/10304)
166+
#
167+
# This is necessary in order to rebuild or fetch new wheels. For example, if you update
168+
# the `icu` library in on your system, you will need to rebuild the PyICU Python package
169+
# in order to incorporate the correct dynamically linked library locations otherwise you
170+
# will run into errors like: `ImportError: libicui18n.so.75: cannot open shared object file: No such file or directory`
171+
$ rm -rf $(poetry config cache-dir)
172+
```
173+
174+
153175
## ...run a command in the `poetry` virtualenv?
154176

155177
Use `poetry run cmd args` when you need the python virtualenv context.

0 commit comments

Comments
 (0)