There are many ways to do it, since so far you would need to write some simple code/script to achieve this.
A way I found that works for me (Windows 10/11) is:
pip --disable-pip-version-check list --outdated --format=json | python -c "import json, sys; print('\n'.join([x['name'] for x in json.load(sys.stdin)]))" | xargs -n1 pip install -U
Also, you could do the same by installing a package called “pip-review”.
pip install pip-review
After installing the package, now you can run the following command to do an auto-upgrade
pip-review –local –auto
or this to do an interactive upgrade
pip-review –local –interactive
Happy codin’!!