apt-get and dpkg commands in Debian

Published April 01, 2008
Table of Contents

Basics

Debian GNU/Linux uses apt short for Advanced Package Tool.

Install software using apt

apt-get install software

Updating the list of packages in your sources.list.

apt-get update

Update software using apt

apt-get upgrade

To change the list of apt mirrors

apt-setup

Search for package

apt-cache search _package_

Uninstall software using apt apt-get remove software

Shortcuts

update the package lists

apt-get update

update the available package lists

dselect update

upgrade all installed packages

apt-get upgrade

installs package

apt-get install _pkg_

uninstall package

apt-get remove _pkg_

show all installed and removed packages

dpkg -l

show install status of package

dpkg -l _pkg_

show all packages that match pattern

dpkg -S _pattern_

list files in package

dpkg -L pkg

show status of package

dpkg -s pkg

show details of package

dpkg -p pkg

list relevant packages

apt-cache search string

install package from a deb file

dpkg -i file.deb

purge package (and config?)

dpkg -P pkg

re-run the configure for a package

dpkg-reconfigure pkg

get the source

apt-get source pkg

config build-deps for source and install as needed

apt-get build-dep

install package from specific release

apt-get -t release install pkg

prevent name from running at bootup

update-rc.d -f name remove

upgrade the distribution

apt-get dist-upgrade

Related Posts

If you have any questions, please contact me at arulbOsutkNiqlzziyties@gNqmaizl.bkcom. You can also post questions in our Facebook group. Thank you.

Disclaimer: Our website is supported by our users. We sometimes earn affiliate links when you click through the affiliate links on our website.

Last Updated: April 01, 2008.     This post was originally written on April 01, 2008.