I installed a few pip
packages using sudo
, and I would like to go back and remove all of those so I may install it using --user
(or however it is recommended to install things).
Asked
Active
Viewed 17 times
0

LiterallyJohnny
- 43
- 7
-
`sudo pip freeze` – Selcuk Jan 21 '21 at 01:58
-
@Selcuk ...that's not what I am asking. I want a list of all packages installed globally onto my system. I do not want a list of packages installed onto the local directory. – LiterallyJohnny Jan 21 '21 at 02:48
-
What do you mean by "local directory"? Python packages are not installed in any directory; they go to the `site-packages` directory of the interpreter/virtualenv. You should clarify your question if this is not what you are asking for. – Selcuk Jan 21 '21 at 03:56
-
When you install a pip package without root, it installs it for the user, not globally. This is one of the preferred way to install pip packages. When you install pip packages using root/sudo, they get installed globally onto the system. However, I was not aware you weren't supposed to install pip packages using root/sudo. I am trying to find out if there was a way to check for all packages installed using root/sudo, and not packages that were installed using `--user` or without root/sudo. – LiterallyJohnny Jan 23 '21 at 05:59
-
I see. I can't test this at the moment but `pip freeze --user` _should_ list the user installed modules only. – Selcuk Jan 24 '21 at 23:32