[Fixed]-How to uninstall pip packages on Elastic Beanstalk

1👍

So far, I think the best option is to ssh into the instance and do something like:

source /opt/python/run/venv/bin/activate && yes | pip uninstall package-to-uninstall

You can alternatively add the following as a container_command in your syspackages.config file in .ebextensions :

command: "source /opt/python/run/venv/bin/activate && yes | pip uninstall package-to-uninstall"

Please, let me know if you figured out a more elegant way to fix this.

Leave a comment