MPM (MiKTeX Package Manager) was originally intended to be a tool for MiKTeX/Windows users. But the program can be helpful for users of other TeX systems too, because many of the MiKTeX packages are system-independent.
Installing the package database
First of all you should install the package database files on your computer. To do this, run
> sudo mpm --update-db
This command retrieves the package database files from a remote package repository and installs them in the installation directory.
To list the contents of the just installed package database, run
> mpm --list
To get datailed information about a package, run
> mpm --print-package-info=PACKAGE
Setting the installation directory
The installation directory is the root of a TDS-compliant TEXMF directectory hierarchy. The location of the installation directory is determined by the configure script.
The --install-root option lets you set the installation directory at run-time. For example, the following command installs the package database files in your home TEXMF:
> sudo mpm --install-root=~/texmf --update-db
Installing and updating packages
Use the --install option to install a package. For example, run
> sudo mpm --install=a0poster
to install the a0poster package.
The --update option can be used to update installed packages. Run
> sudo mpm --update
to update all installed packages. Run
> sudo mpm --update=PACKAGE
to update a certain package.