Debian:Package management
From Linux 101, The beginner's guide to all things Linux.
Packages are handled through two major suites of tools: dpkg and apt. dpkg handles installing and removing packages. However, it does not provided fetching or dependency resolution for the packages. For this, apt is used.
Here we will show the very basics. Further uses of the tools can be found on their own pages.
Contents |
[edit] Updating apt
For apt to know what programs and versions are available, one must run:
apt-get update
This will contact all the sites defined in your sources.list file to see if there is any updated data.
[edit] Installing
Usually you will want apt to download the files and its dependencies and install them for you:
apt-get install <package>
Single Debian package file: To install a single .deb file, you'd use:
dpkg -i <.deb file>
[edit] Uninstalling
Removing
Removing a package and packages depending on it:
apt-get remove <package name>
Removing a single package:
dpkg -r <package name>
When removing a Debian package, it does not delete all the configuration files associated with the package. To remove those, the package must be purged.
Purging
When removing the package:
apt-get remove --purge <package name>
To purge a programs configuration files (and uninstall it if it has not already been):
dpkg -P <package name>
[edit] Searching Packages
Searching the vast amounts of packages is rather easy:
apt-cache search <regex pattern>
| Navigation: Debian Index |

