I know that installing python packages using sudo pip install
is bad a security risk. Unfortunately, I found this out after installing quite a few packages using sudo
.
Is there a way to find out what python packages I installed using sudo pip install
? The end goal being uninstallment and correctly re-installing them within a virtual environment.
I tried pip list
to get information about the packages, but it only gave me their version. pip show <package name>
gave me more information about an individual package such as where it is installed, but I don't know how to make use of that information.
any modules you installed with sudo
will be owned by root, so you can open your shell/terminal, cd
to site-packages
directory & check the directories owner with ls -la
, then any that has root
in the owner column is the one you want to uninstall.