Notes

Third-Party Repositories

Other Package Managers

pip-safe

Create a Python virtualenv and install pip-safe. This allows safe, system-wide installation of Python packages.

Install Python packages system-wide using sudo pip-safe --system install <package name>

Cargo

Install Rust packages for the current user using cargo install --git <url> or cargo install <package name>

Go

Download the latest version of go and install it: sudo porg -lp golang "tar zxvf go*tar.gz -C /opt"

Install Go packages for the current user using go install <package url>

Flatpak

Install flatpaks with flatpak install <pkg>

Cheatsheets

dnf

Action Command
Install package dnf install <pkg>
Install .rpm dnf install <pkg.rpm>
Uninstall package dnf remove <pkg>
List files in package rpm -ql <pkg>
Find package owner of file dnf provides <file> or dnf repoquery --file <file>
Dependencies of package dnf repoquery --requires <pkg> --resolve
Reverse dependencies of package rpm -q --whatrequires <pkg>
Remove unneeded dependencies dnf autoremove
List repositories dnf repolist
Add third-party repository dnf config-manager --add-repo <repository URL>

porg

Action Command
Install package porg -lD "<install command>"
Install package to $HOME porg -lD -L <logdir> "<install commands>"
Uninstall package porg -r <pkg>
List files in package porg -f <pkg>

apt

Action Command
Install package apt install <pkg>
Install .deb gdebi <pkg.deb>
Uninstall package apt remove <pkg>
List files in package dpkg --listfiles <pkg>
Find package owner of file dpkg -S <file>
Reverse dependencies of package apt-cache --installed [--recurse] rdepends <pkg>
Remove unneeded dependencies apt autoremove
Remove orphaned config files dpkg --list | grep '^rc ' | awk '{ print $2 }' | sudo xargs dpkg -P

cargo

Action Command
List installed packages cargo install --list
Upgrade packages cargo install <pkg>
Upgrade git packages cargo install --git <url> <name>

Flatpak

Action Command
List installed packages flatpak list
Upgrade packages flatpak upgrade

pip

Action Command
List installed packages pip list
Upgrade packages pip list --path /usr/local/lib/python3.10/site-packages/ --outdated --format=freeze | grep -v '^\-e' | cut -d= -f1 | xargs -n1 sudo pip install --upgrade

pip-safe

Action Command
List installed packages pip-safe list
Upgrade package pip-safe --system update <pkg>
Upgrade all packages pip-safe list | sed '1,2d;s@^\*@@;s@\s\s*.*$@@' | xargs -n1 sudo pip-safe --system update