- See also:
Package managers compared | yum/dnf (rpm files) | apt (deb files) | pacman (tgz, ztsd files) | pkg |
---|---|---|---|---|
List installed packages by size | ? | [1] | [2] | pkg query '%sh %n' | sort -h |
Show installed packages | rpm -qa |
dpkg -l |
pacman -Q |
pkg info |
Show package that provides file x | yum whatprovides x |
dpkg -S x |
pacman -F x |
pkg which x |
Show files from package x | repoquery --list x |
dpkg -L x |
pacman -Ql x |
pkg query %Fp x |
Show package x info | yum info x |
apt info x |
pacman -Qi x |
pkg info x |
Show package x's dependencies | yum deplist x |
apt-rdepends x |
pacman -Qi x |
pkg query %do x |
Show packages that depend on x | rpm -q --whatrequires x |
apt depends x |
pacman -Qi x |
pkg query %ro x |
Install package group x | yum groupinstall 'x' |
? | pacman -S x |
- |
Show package groups | yum group list |
? | pacman -Qg |
- |
Remove orphaned packages | - | apt autoremove |
pacman -Rns $(pacman -Qdtq) |
pkg autoremove |
Show update history | yum history list all |
/var/log/apt/history.log |
/var/log/pacman.log |
/var/log/messages |
Rollback update | yum history undo <ID> |
apt-history rollback |
pacman -U /var/cache/pacman/pkg/<pkg-version> |
- |
Show info from recent transaction | yum history info <ID> |
- | - | - |
Remove duplicate packages | package-cleanup --cleandupes |
- | - | - |
- [1]
dpkg-query --show --showformat='${Installed-Size}\t${Package}\n' | sort -n
- [2]
pacman -Qi | awk -F: '/^Name/ {name=$2} /^Installed/ {gsub(/ /,"");size=$2;print size,name}'
Repo actions compared | yum/dnf | apt | pacman | pkg |
---|---|---|---|---|
Add repo x | yum-config-manager --enable x |
add-apt-repository x |
/etc/pacman.conf |
? |
Add third-party repo x | /etc/yum.repos.d/ |
add-apt-repository ppa:x |
? | ? |
Show available repos | yum repolist all |
/etc/apt.sources.list |
? | ? |
Show installed repos | yum repolist |
/etc/apt.sources.list |
/etc/pacman.conf |
? |
-
= Not supported.?
= Unkown.
- Finding specific package versions
- Go to https://launchpad.net
- Click
Ubuntu package building and hosting
- Search for your package
- Select your package (example: https://launchpad.net/ubuntu/+source/firefox)
- Click
View full publishing history
(example: https://launchpad.net/ubuntu/+source/firefox/+publishinghistory) - Click your desired package version (example: https://launchpad.net/ubuntu/+source/firefox/120.0.1+build1-0ubuntu0.20.04.1)
- Under
Builds
, click your desired architecture (example: https://launchpad.net/~ubuntu-mozilla-security/+archive/ubuntu/ppa/+build/27033836) - Scroll down to
Built files
to download the specific.deb
file package you want
- Issue:
package is marginal trust
- Solution:
pacman -Sy archlinux-keyring && pacman -Syu
- Solution:
- Issue:
invalud or corrupted database (PGP signature)
- Solution:
1. Comment out the top mirror in `/etc/pacman.d/mirrorlist` 2. rm /var/lib/pacman/sync/* 3. pacman -Syu
- Solution:
rpm -ivh file.rpm
= Install rpm file as package.-i
= Install rpm.-v
= Verbose.-h
= Use hash marks to display progress.
yum install ./file.rpm
= Install .rpm file and automatically resolve and install dependencies.-v
= Be verbose.-h
= Use hash marks to display progress.
yum install epel-release
= Install EPEL repo.
- Go to centos.org.
- Click 'get centos now'.
- Click 'alternative downloads'.
- Click 'i386' in the row corresponding to CentOS version 6.
- Click any mirror link.
- Click the
.iso
you wish to download. It will likely be the largest one. Don't download the torrent. - Save it anywhere.
- Launch the VM and in the top-left corner of VMWare, click VM -> Removable Devices -> CD/DVD -> Connect.
- Navigate to the
.iso
image file you downloaded. - Inside the VM, run
sudo mount /dev/cdrom /[mount-location]
. - The disk is now mounted and you can browse the packages.
- To turn the packages into a full repo, you need to add the disk ID to the yum configuration. you can do that as follows:
head -1 /[mount-location]/.discinfo
- Copy that number.
- Run your favorite text editor to open
/etc/yum.repos.d/CentOS-Base.repo
. - For each repo you'd like to add, next to
mediaid=
, enter the number you copied. - Next to
baseurl=
, enter the path of the mounted disk. For example, if you mounted the disk on/mnt
, the row would readbaseurl=file:///mnt
. - Run
yum clean all
. - Yum should now recognize the disk as a repository.