homely
homely copied to clipboard
pipinstall auto-cleans too much or too little
pipinstall() should auto-clean the packages that it installed and that the user no longer wants. No more, no less.
There are two issues with the current cleanup code:
- It remove packages that were installed as requirements of something the user asked for.
- It will remove packages that have since become dependencies of other packages that were installed.
The solution is:
- homely needs to keep track of every single package it installed, not just the one the user named, and attempt to auto-clean all of them.
- homely needs to be dependency-aware when removing packages, and not remove any package unless it is also removing all its dependencies.
- Update the pipinstall() docs so to reflect new behaviour