Because Ubuntu has a mix of utilities to manage packages I constantly seem to be forgetting the options I need when I go to do basic package management. Mostly for my sake are the ones I use most regularly:
List installed packages:
1 2 |
dpkg -l dpkg --get-selections |
List names of available packages (including those not installed):
1 |
apt-cache pkgnames |
Tell what package owns what file:
1 2 |
apt-file search FILE dsearch -s FILE |
List files in a given package:
1 2 |
dpkg --listfiles PACKAGE dpkg-query -L PACKAGE |
Force a package reinstall:
1 |
apt-get --reinstall install PACKAGE |
Show general package information:
1 2 |
apt-cache show PACKAGE dpkg --print-avail PACKAGE |
Show package dependency information:
1 |
apt-cache showpkg PACKAGE |
Leave a Reply