This is a series of gists collecting Linux utilities
Last active
April 24, 2023 10:29
-
-
Save Davidelanz/29dc165716d4618fa5c2cebac336cd50 to your computer and use it in GitHub Desktop.
Linux utilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List manually installed packages | |
# https://askubuntu.com/a/492343 | |
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to Update All Python Packages | |
# https://www.activestate.com/resources/quick-reads/how-to-update-all-python-packages/ | |
# To generate a list of all outdated packages: | |
python3 -m pip list --outdated | |
# To upgrade all packages using pip with grep on Ubuntu Linux: | |
python3 -m pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U | |
# To upgrade all packages using pip with awk on Ubuntu Linux: | |
python3 -m pip list -o | cut -f1 -d' ' | tr " " "\n" | awk '{if(NR>=3)print}' | cut -d' ' -f1 | xargs -n1 pip3 install -U |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment