Skip to content

Commit c627952

Browse files
committed
Use 'pip list' instead of 'pip freeze' to generate package names for uninstall
1 parent d2a6e99 commit c627952

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/venv-cli/venv.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,11 @@ venv::clear() {
352352
fi
353353

354354
venv::color_echo "${_yellow}" "Removing all packages from virtual environment ..."
355-
pip freeze --require-virtualenv \
356-
| cut -d "@" -f1 \
355+
pip list --format freeze \
356+
--exclude pip \
357+
--exclude setuptools \
358+
--exclude wheel \
359+
| cut -d "=" -f1 \
357360
| xargs --no-run-if-empty pip uninstall --require-virtualenv -y
358361
venv::color_echo "${_green}" "All packages removed!"
359362
}

0 commit comments

Comments
 (0)