Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstall instructions unclear #2245

Closed
DerekYu177 opened this issue Mar 30, 2020 · 22 comments
Closed

Uninstall instructions unclear #2245

DerekYu177 opened this issue Mar 30, 2020 · 22 comments
Labels
area/docs Documentation issues/improvements

Comments

@DerekYu177
Copy link

Issue info

Poetry version: 1.0.5
OS: Ubuntu 18.04.1 LTS
Shell: zsh

Problem

I'm trying to uninstall poetry.

I think when I ran the curl command I piped it into the default python instead of python3.7. When I run any command, I get a RuntimeWarning of the form:

/home/derekyu/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: 
RuntimeWarning: The _posixsubprocess module is not being used. 
Child process reliability may suffer if your program uses threads.
  "program uses threads.", RuntimeWarning)

This error suggests that I'm calling it from python 2.7 instead of 3.7, which is ideally what I would like to be using.

Methods used to attempt resolution of problem

The instructions suggest using the --uninstall option. Running that gives me:

➜  ~ poetry --uninstall
[NoSuchOptionException]
The "--uninstall" option does not exist.

along with the associated stack trace. Running it without the options -- gave me:

➜  ~ poetry uninstall
The command "uninstall" is not defined.

Did you mean this?
    install

I can't seem to find the get-poetry.py that is being continually referenced in the docs. If it helps, I ran find / get-poetry.py and didn't get anything. Should it be included in ~/.poetry/ ?

The docs say:

If you decide Poetry isn't your thing, you can completely remove it from your system by running the installer again with the --uninstall option or by setting the POETRY_UNINSTALL environment variable before executing the installer.

I poked around in ~/.poetry/lib but without calling it from ~/.poetry/bin I get reference errors, which make sense.

My resolution

curl https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > get-poetry
➜  ~ python get-poetry.py --uninstall
# We are sorry to see you go!

This will uninstall Poetry.

It will remove the `poetry` command from Poetry's bin directory, located at:

$HOME/.poetry/bin

This will also remove Poetry from your system's PATH.

()
Are you sure you want to uninstall Poetry? (y/[n]) y

Points that may require clarification

  1. is the RuntimeWarning due to the default installer using python 2.7?
  2. how come there isn't a poetry uninstall option?
  3. Should the docs be amended to suggest that you use python3.7 when curling the installer.
  4. Should the installer be installed into ~/.poetry/lib/ for ease of use?
@DerekYu177 DerekYu177 added the area/docs Documentation issues/improvements label Mar 30, 2020
@finswimmer
Copy link
Member

finswimmer commented Mar 30, 2020

Hello @DerekYu177 ,

is the RuntimeWarning due to the default installer using python 2.7?
That's a problem with vendoring the subprocess package for python2. See #2106

how come there isn't a poetry uninstall option?
AFAIK there was some work to have such a command. But it was somehow tricky to get work on windows.

You are right that the docs can be improved about how to uninstall poetry:

curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python - --uninstall

Should the docs be amended to suggest that you use python3.7 when curling the installer.

It doesn't matter with which python poetry was installed. Once it is installed it requires to find python in the path. This might change in the future:

Should the installer be installed into ~/.poetry/lib/ for ease of use?

That's on you if and where you want to place the installer. :) poetry just provides the scripts and gives a suggestion on how to optain and start it.

fin swimmer

@jaepil-choi
Copy link

This should be on the official uninstallation instruction.

@johnthagen
Copy link
Contributor

This is part of the official uninstallation instructions for the official installer if you scroll to step 6 on the current master docs:

@wrosko
Copy link

wrosko commented Jun 8, 2022

Running this and restarting my shell, it seems I can still call poetry and all of its commands. Afterward if I run either of the suggested commands

curl -sSL https://install.python-poetry.org | python3 - --uninstall
curl -sSL https://install.python-poetry.org | POETRY_UNINSTALL=1 python3 -

I get:

Poetry is not currently installed.

which poetry leads me to the directory it still exists in /Users/USERNAME/Library/Python/3.8/bin/poetry

@chrischang5
Copy link

Same issue as above :(

@dave4jr
Copy link

dave4jr commented Aug 20, 2022

@johnthagen Just FYI... It's on Step 6 for master but it should also be on 1.1 or whatever the other stable version is because that's the place most people will be at. I also couldn't find it until finding this issue. Just a heads up. Thanks.

@johnthagen
Copy link
Contributor

@dave4jr I agree. There is a lot about the stable docs that need updating, but it's simply because master / 1.2 release has been forked for a long time. It is getting close to release and we'll finally be able to have stable include all of the updates in master and be a better experience.

See

@marcodlk
Copy link

I am trying to uninstall Poetry 1.2.0a2 preview so I can install the latest release 1.2.1, but I am unable to uninstall Poetry due to the issues raised above. I tried both the recommended script with:

$ curl -sSL https://install.python-poetry.org | python3 - --uninstall
Poetry is not currently installed

and the old script with:

$ curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python - --uninstall
# We are sorry to see you go!

This will uninstall Poetry.

It will remove the `poetry` command from Poetry's bin directory, located at:

$HOME/.poetry/bin

This will also remove Poetry from your system's PATH.

The latter outputs the notification of removal as shown, but does not actually remove my Poetry installation. It runs without entering interactive mode even though the output suggests there should be a prompt, is that expected?

Any help is appreciated. Thanks.

@agiridharan
Copy link

Same Issue as @marcodlk

@neersighted
Copy link
Member

neersighted commented Sep 26, 2022

This issue is long resolved as the recommended uninstall methods are published in the Poetry documentation. If you are having issues uninstalling Poetry, it is likely that you have installed with some other method. Please do not continue to comment on this issue with support questions as it sends unnecessary notifications.

which -a poetry, ls -l $(command -v poetry) and inspecting the list of software installed using your OS/distro package manager, Homebrew, or pipx, etc. are all methods to determine why you may still have a copy of Poetry kicking around. If you are still having trouble, please start a Discussion, join Discord, or (if you have done extensive troubleshooting and have found a case where the installer does not remove the paths it controls) open an issue for a suspected bug.

@marcodlk
Copy link

marcodlk commented Nov 4, 2022

Thanks @neersighted I should've checked, it was installed under homebrew. Just an extra note in case it helps anyone, if the new installation of poetry is different from before you will have to invalidate the poetry command hash in any shells that were already open - this can be done with: hash poetry

@austinschrader
Copy link

austinschrader commented Jan 18, 2023

Uninstalling should not be this laborious.

I've had an easier time getting rid of malware.

@dilipupf
Copy link

curl -sSL https://install.python-poetry.org | python3 - --uninstall

As mentioned above this worked for me

@felix11h
Copy link

For anybody looking to uninstall version <1.2.0, here is a valid path to the old install script

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/901bdf0491005f1b3db41947d0d938da6838ecb9/get-poetry.py | python3 - --uninstall

From https://stackoverflow.com/questions/74067547. Hope this helps.

@gaby
Copy link

gaby commented Jun 19, 2023

Uninstalling anything with Poetry feels like you need an Engineering degree...

@italolemoselectric
Copy link

For anybody looking to uninstall version <1.2.0, here is a valid path to the old install script

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/901bdf0491005f1b3db41947d0d938da6838ecb9/get-poetry.py | python3 - --uninstall

From https://stackoverflow.com/questions/74067547. Hope this helps.

Worked for me. My version was 1.1.15

@Soyuzbek
Copy link

Soyuzbek commented Aug 3, 2023

In my case, I forgot that I installed poetry via pip. and pip uninstall poetry worked. For some users you might need sudo.

@96chip
Copy link

96chip commented Sep 22, 2023

In my case, I forgot that I installed poetry via pip. and pip uninstall poetry worked. For some users you might need sudo.

I have also installed it via pip, but when i try to uninstall it via pip i get a "Permission Denied" error. I tried it also with sudo but:

Found existing installation: poetry 1.1.12
Not uninstalling poetry at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'poetry'. No files were found to uninstall.

This is the error i get. I tried also running the old method of uninstalling it using the github url but nothing happens.

@marcodlk
Copy link

@96chip Try @neersighted suggestion from top of thread: manually find your Poetry installation files with which -a poetry and ls -l $(command -v poetry). This will either give you some insight into the tool that you installed poetry with (for me it was Homebrew), or in the worst case, you can manually remove those files to effectively uninstall Poetry.

@crotielwf

This comment was marked as spam.

@feelosophy13
Copy link

feelosophy13 commented Feb 2, 2024

I'm on poetry 1.1.11 on MacOS.

I'm running this command as suggested above:

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/901bdf0491005f1b3db41947d0d938da6838ecb9/get-poetry.py | python3 - --uninstall

I get this message but nothing happens.

# We are sorry to see you go!

This will uninstall Poetry.

It will remove the `poetry` command from Poetry's bin directory, located at:

$HOME/.poetry/bin

This will also remove Poetry from your system's PATH.

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Documentation issues/improvements
Projects
None yet
Development

No branches or pull requests