DebianPackageManagement

From NA-Wiki

Jump to: navigation, search

Contents

Overview

Basic commands for dealing with package management in Ubuntu and Debian. All commands should be executed either as super user (root) or with 'sudo'.

Commands

apt-get and apt-cache

Update available packages list

apt-get update

Upgrade installed packages

apt-get upgrade
or
apt-get dist-upgrade

Search available packages

apt-cache search package
or
apt-cache search words part of the description

Clean apt-get cache (/var/cache/apt/archives)

apt-get clean

dpkg

Install a package from a .deb file

dpkg -i package.deb

Show all installed packages

dpkg -l | less

Find out which (installed) package owns a specific file on the file system

dpkg -S /usr/bin/binary

Show all files provided by a (installed) package

dpkg -L package

apt-file

Install and update apt-file database

apt-get install apt-file
apt-file update

Search for files provided by all packages in the repositories

apt-file search file | less
or
apt-file search part/of/file/path | less
Personal tools