|
What appears below are my personal notes I wish were part of my long-term memory but don't always seem to fit. I strive for accuracy and clarity and appreciate feedback. If applying any of this information anywhere, confirm for youself the correctness of your work as what you see below might very well be, albeit unintentionally, incorrect or misleading. These notes are here as an easy reference for myself.
Information worthy of a more formal presentation will appear elsewhere than this "Scratch" area. - ksb
My attempt at keeping straight the plethora of package managers I use (with the exception of FreeBSD).
$ dpkg -lSearch for availble "foo" related packages:
$ apt-cache search foo
$ apt-cache search -f fooor
$ apt-cache showpkg foo
$ apt-get install foo-serverRemove the "foo-server" package:
$ apt-get remove foo-serverRemove the "foo-server" package and all it's config files:
$ apt-get purge foo-serverFind the package that owns a specific file:
$ dpkg -S /path/to/fileGet updates about latest packages:
$ apt-get updateUpgrade any installed packages:
$ apt-get upgrade
$ port list $ port search fooTo list information about & variants within port foo:
$ port info foo $ port variants fooTo list dependencies required by port foo:
$ port deps fooTo list ports dependent on port foo:
$ port dependents fooTo install port foo with variant bar:
$ sudo port install foo +barTo deactivate port foo (so you can install a different variant):
$ sudo port deactivate fooTo uninstall port foo:
$ sudo port uninstall fooTo list all ports currently installed:
$ port installedTo find the port that provides file /path/to/foo:
$ port provides /path/to/fooTo list the contents of port foo:
$ port contents fooTo update MacPort itself and it's list ports (the -d is 'debug' to show more):
$ sudo port -d selfupdateTo list outdated ports (after a selfupdate):
$ port outdatedTo upgrade outdated or installed ports (after a selfupdate):
$ port upgade outdated $ port upgrade installedTo clean out and remove inactive ports (inactive ports appear to be past versions of upgraded ports):
$ port uninstall inactive
# rpm -ivh fooTo remove package 'foo':
# rpm -e foo
For either of these commands: --test can be added to check what would happen without doing it or -vv to be real verbose about what it's doing
To see if package foo is installed:$ rpm -q fooIf you only know part of the name of the package -qa will list all installed packages, so to list all packages with foo in their name:
$ rpm -qa | grep fooTo list all the files in package 'foo':
$ rpm -ql fooTo find the package that has file /path/to/foo in it:
$ rpm -q --file /path/to/foo
# yum -y updateTo check to see what has updates ready:
# yum check-updatesTo install the latest version of package foo:
# yum install fooTo list all packages on the server that have foo in their name:
$ yum list '*foo*'To get detailed information about package foo:
$ yum info foo