概要
Linuxの記事はいっぱいあるけど、Windows上のpoetryをuninstallしよう、という記事はなかなか見つからなかったので、記事を作成しておいた。
アンインストールする前に
poetryの環境(env)を削除しておこう。
いらない環境を取っておいても仕方ないからね。
pyproject.toml
のあるディレクトリ内で次のコマンドを打つと、今残っている環境が一覧表示される。
poetry env list
もし残っていたら削除しておこう。
以下のコマンドも、pyproject.toml
のあるディレクトリで実行しよう。
poetry env remove
# もしくは
poetry env remove <作成されている環境名>
アンインストール開始
以下のコマンドを実行すると、
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python - --uninstall
次のような結果が返ってきて、poetryコマンドが実行できなくなっていた。
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python - --uninstal
# We are sorry to see you go!
This will uninstall Poetry.
It will remove the `poetry` command from Poetry's bin directory, located at:
%USERPROFILE%\.poetry\bin
This will also remove Poetry from your system's PATH.
参考にした記事