PackageManager

From Segfault
Jump to: navigation, search

Task dpkg apt rpm dnf (Fedora) yum (Redhat) zypper (SuSE) pacman (Arch) pkgadd (SysV) pkgutil (Solaris) pkg (OpenSolaris) port (MacPorts) portage (Gentoo) pkg_info (FreeBSD)
show description dpkg -s apt-cache show rpm -qi dnf info yum info zypper info pacman -S -i pkginfo -l pkgutil --describe pkg info port info equery m pkg_info
install dpkg -i apt-get install rpm -hiv dnf install yum install zypper install pacman -S pkgadd -d pkgutil -i pkg install port install emerge pkg_add
remove dpkg -r apt-get remove rpm -e dnf remove yum remove zypper remove pacman -R pkgrm pkgutil -r pkg uninstall port uninstall emerge --unmerge pkg_delete
package owning file dpkg -S rpm -qf dnf provides yum provides zypper search --provides pacman -Q -o pkgchk -l -p pkgutil -F pkg search -lp port provides qfile, equery b -W], pkg_which (as root))
files in installed pkg dpkg -L rpm -ql pacman -Q -l pkgchk -l pkgutil -L pkg contents port contents qlist, equery f pkg_info -L
files in uninstalled pkg apt-file search dnf provides yum provides pacman -Fy -o pkg contents -r
files in pkg-file dpkg-deb -c rpm -qlp bsdtar -Jtf tar -tjf
installed packages dpkg -l rpm -qa dnf list installed yum list installed zypper packages --installed-only pacman -Q pkginfo pkgutil -l pkg list port echo installed qlist -I pkg_info
available packages dpkg --get-selections apt-cache dumpavail dnf list yum list zypper packages pacman -S -l pkgutil -a pkg list -a
extract packages rpm2cpio foo.rpm | cpio -vid bsdtar -Jxf pkgtrans foo . pkgutil --extract extract in $PORTDIR/distfiles tar -xjf

Tricks

As long as FreeBSD pkg doesn't provide an interface for that[1], we can do this manually:

$ find /usr/ports -iname "pkg-plist*" -maxdepth 3 -exec grep -iH "bin/mkisofs" '{}' +
/usr/ports/sysutils/cdrtools-devel/pkg-plist:bin/mkisofs
/usr/ports/sysutils/cdrtools/pkg-plist:bin/mkisofs

Links

  • Which package/port provides file xy
  • Retrieved from "https://trent.utfs.org/mediawiki/index.php?title=PackageManager&oldid=10043"