question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I uninstall packages that have been removed from pyproject.toml?

See original GitHub issue
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Question

pipenv has pipenv clean which removes all packages that are no longer in Pipfile.lock from the virtualenv. What is the equivalent with poetry? The docs say there is no need for pipenv sync and pipenv clean due to the remove command https://github.com/sdispater/poetry#remove-command

But how does this work? I would need to run poetry remove XXX against all my virtualenvs - manually keeping track of all packages that have been removed and remembering to remove them myself?

Is there not any way to sync my poetry.lock to my virtualenv to ensure the virtualenv only has the packages specified in poetry.lock installed?

I have a virtualenv on each box I deploy to, and keep pyproject.toml and poetry.lock under source code control. I then want a way to ensure each of those virtualenvs only has the packages in poetry.lock installed.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:25
  • Comments:45 (18 by maintainers)

github_iconTop GitHub Comments

17reactions
earshinovcommented, May 24, 2020

@stephsamson , is there any date for the next release? We are waiting for this feature.

16reactions
kastephcommented, May 1, 2020

#2172 fixes this issue and should be available in the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry remove fails to remove any packages? - Stack Overflow
This worked for me. Although I did get the message The --dev option is deprecated, use the `--group dev` notation instead. – Bell....
Read more >
How to Uninstall Python Packages - ActiveState
Open a command window by entering 'cmd' in the Search Box of the Task bar · Press Ctrl+Shift+Enter to gain Administration (Admin) privileges...
Read more >
Commands | Documentation | Poetry - Python dependency ...
The remove command removes a package from the current list of installed packages. poetry remove pendulum. If you want to remove a package...
Read more >
How To Install Poetry to Manage Python Dependencies on ...
Step 4 — Removing and Pinning Dependencies. In order to keep consistency between your currently installed dependencies and the dependencies you ...
Read more >
pip uninstall - pip documentation v22.3.1
pip is able to uninstall most installed packages. ... with python setup.py install , which leave behind no metadata to determine what files...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found