Update #Python modules #pip regularly #NotetoSelf

Krishnendu Paul

Jun 17, 2020 1 min read


We update our linux boxes almost regularly, so Debian/Ubuntu user like me run apt update && apt upgrade -y regularly. But, we miss updating python library regularly which breaks a lot of python modules or make them outdated.

Sharing 2 methods to do it easily with single liner.

1)

Python 2.x:
pip list --outdated --format=freeze | grep -v '^-e' | cut -d = -f 1 | xargs -n1 pip install -U

Python 3.x:
pip3 list --outdated --format=freeze | grep -v '^-e' | cut -d = -f 1 | xargs -n1 pip3 install -U

2)

pip3 install pipdate

then run pipdate command from shell.


Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.