$ pip freeze > args | pip uninstall -y -r args | rm args
$ pip freeze > args | pip uninstall -y -r args | del args
-y
flag autoconfirm deletion, so it will not prompt you for if you would like to delete that package
-r
tells to use requirements file, the name of the file in my example is args
which was created by pip freeze > args