Skip to content

Instantly share code, notes, and snippets.

@WingTillDie
Last active July 4, 2023 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WingTillDie/8ed77f7d993b64f1c96ec73b318c850c to your computer and use it in GitHub Desktop.
Save WingTillDie/8ed77f7d993b64f1c96ec73b318c850c to your computer and use it in GitHub Desktop.
apt Quick Start Guide and pacman Rosetta

apt Quick Start Guide and pacman Rosetta

Ubuntu Package Manager Quick Start Guide

Local Remote Description
dpkg -S, --search apt-file search Search for packages that owns the file
dpkg -L, --listfiles apt-file list List files owned by the package
dpkg -s, --status apt show Show package information
dpkg -l, --list apt list Search for package name

Concept: 1 package owns some file(s)

Ubuntu and Arch Linux Package Managers Rosetta

Ubuntu Local Ubuntu Remote Arch Linux Local Arch Linux Remote Description
dpkg -S, --search apt-file search pacman -Qo pacman -F Search for packages that owns the file
dpkg -L, --listfiles apt-file list pacman -Ql pacman -Fl List files owned by the package
dpkg -s, --status apt show pacman -Qi pacman -Si Show package information
dpkg -l, --list apt list pacman -Qs pacman -Ss Search for package name

Examples

Example of dpkg -L

$ dpkg -L gzip | fgrep bin/
/bin/gunzip
/bin/gzexe
/bin/gzip
/bin/uncompress
/bin/zcat
/bin/zcmp
/bin/zdiff
/bin/zegrep
/bin/zfgrep
/bin/zforce
/bin/zgrep
/bin/zless
/bin/zmore
/bin/znew

Example of dpkg -S

$ dpkg -S bin/zcat
gzip: /bin/zcat

Appendix

For more info.,
In man dpkg,
search for dpkg-query actions

In man apt,
search for apt-cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment