Package management - jasper-zanjani/dotfiles GitHub Wiki

add-apt-repository

Add Docker repos

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

alien

i r t

apt

dist-upgrade install list remove update upgrade

apt-cache

depends dump rdepends search showpkg showsrc stats

Display package information regarding package cache

apt-key

Add key specified by apt in error message sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68980A0EA10B4DE8

add-apt-repository

Add Docker repository

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
add-apt-repository "deb http://security.ubuntu.com/ubuntu trusty-security main universe"

[Convert][LPM 231 Regolith Linux] Ubuntu to Regolith Linux

add-apt-repository -y ppa:kgilmer/regolith-stable
apt updatelib
apt install regolith-desktop

apt-key

Add a public GPG key to keyring

# Google Cloud SDK
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

# https://medium.com/faun/docker-running-seamlessly-in-windows-subsystem-linux-6ef8412377aa
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Install key from Mono

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

dnf

View all dnf commands

dnf history

View all packages installed by user

dnf history userinstalled

Display information about a package group [ref][https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-virtualization/]

dnf groupinfo virtualization

Install a package group [ref][https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-virtualization/]

dnf install @virtualization

Install a package group, including optional packages [ref][https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-virtualization/]

dnf group install --with-optional virtualization

dpkg

                  i     l       p   r s              
      C   E   G   I     L       P   R S              
configure get-selections print-avail unpack

dpkg-reconfigure

Run a package's configuration script after it has already been installed.

Change the time zone on a Debian based system using package-based tools

dpkg-reconfigure tzdata

galliumos-repodist

Enable "testing" and "prerelease" repositories wiki.galliumos.org

sudo galliumos-repodist --enable prerelease sudo galliumos-repodist --enable testing sudo galliumos-update

gem

Install a Ruby $PACKAGE

gem install $PACKAGE

Display currently installed Ruby packages

gem list

Remove $PACKAGE

gem uninstall package

Update $PACKAGE

gem update package

pacman

Option POSIX option Effect
Q --query list all installed packages
-R remove {pkg}, but leave dependencies
-Qe list programs explicitly installed by user or program command
-Qeq list only program names explicitly installed
-Qm list programs only installed from AUR
-Qn list programs only installed from main repositories
-Qdt list dependencies no longer needed (orphans)
-Ql --query --list list all files owned by a package
-S --sync install {pkg}
-Sy synchronize package database
-Su update programs
-Syu sync package database (Sy) and upgrade all programs (u) (equivalent to apt-get update && apt-get upgrade)
-Syy force double-check of repositories
-Syyuw downloads programs but doesn't install them, for the option of manual installation
-Rs remove {pkg} as well as its dependencies
-Rns remove {pkg}, dependencies, as well as config files
List installed packages
pacman -Q
pacman --query

List all orphaned dependencies (no longer needed)

pacman -Qdt
pacman --query --deps --unrequired

List only explicitly installed packages and versions

pacman -Qe
pacman --query --explicit

List explicitly installed packages, limiting output to program names

pacman -Qeq
pacman --query --explicit --quiet

List all packages installed from the AUR

pacman -Qm
pacman --query --foreign

List all packages installed from main repos

pacman -Qn
pacman --query --native

Find which package owns {file}

pacman -Qo file
pacman --query --owns file

List all install packages, filtering output to packages that are out-of-date on the local system

pacman -Qu
pacman --query --upgrades

Remove {package}

pacman -R package
pacman --remove package

Remove {package}, dependencies, and config files

pacman -Rns package
pacman --remove --recursive --nosave

Remove {package} as well as its dependencies

pacman -Rs
pacman --remove --recursive

Install {pkg} from the AUR

pacman -S package
pacman --sync package

Remove all packages from the cache as well as unused sync databases

pacman -Scc
pacman --sync --clean --clean

Display information about {package}

pacman -Si package
pacman --sync --info package

Search for {pkg} in AUR repos

pacman -Ss package
pacman --sync --search package

Search for packages matching {searchexpression}

pacman -Ss pattern
pacman --sync --search pattern

Update package database

pacman -Sy
pacman --sync --refresh

Update all packages from AUR and official repos

pacman -Syu
pacman --sync --refresh --sysupgrade

Force refresh of all package databases, even if they appear to be up-to-date

pacman -Syy
pacman --sync --refresh --refresh

Download program updates but don't install them

pacman -Syyuw
pacman --sync --refresh --refresh --sysupgrade --downloadonly

Get number of total installed packages

pacman -Q | wc -l

pip

Display installed packages

pip list

Display information about {package}

pip show package

pydoc

Display all installed Python modules

pydoc modules

rpm

  a   c d e f   h i     l       p q   s     v        
                  I   K             R     U V        
force nodeps nofiles nomd5 nopgp provides test

Query repos for information on {package}

rpm -qi package
rpm --query --info package

Upgrade or install {package}, with progress bars

rpm -Uvh package
rpm --upgrade --verbose --hash package

Display version of Fedora

rpm -E %fedora

snap

disable enable info install logs refresh remove

yay

      c           i                   s   u       y  
                                P Q   S              

yum

                                                x y  

clean all erase groupinstall groupremove history info install list list installed provides remove repolist repolist all search shell update

⚠️ **GitHub.com Fallback** ⚠️