Skip to main content

apt-get and dpkg commands (Debian Linux)

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 packages that contain string
dpkg 
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

Comments

Popular posts from this blog

Ubuntu Linux on Windows

Wubi is an officially supported Ubuntu installer for Windows users that can bring you to the Linux world with a single click. Wubi allows you to install and uninstall Ubuntu as any other Windows application, in a simple and safe way. Are you curious about Linux and Ubuntu? Trying them out has never been easier! Wubi is Simple No need to burn a CD. Just run the installer, enter a password for the new account, and click "Install", go grab a coffee, and when you are back, Ubuntu will be ready for you. Wubi is Safe You keep Windows as it is, Wubi only adds an extra option to boot into Ubuntu. Wubi does not require you to modify the partitions of your PC, or to use a different bootloader, and does not install special drivers. It works just like any other application. Wubi is free of spyware and malware, and being open source, anyone can verify that. Wubi is Discrete Wubi keeps most of the files in one folder, and if you do not like it, you can simply uninstall it as any other appl...

How to Upgrade Windows XP to Windows 7

How to Upgrade Windows XP to Windows 7 Windows 7 is now in RTM stage and general availability will be on October 22. If you are using Windows XP, then there is no upgrade option to windows 7. Windows 7 does not provide an direct in-place upgrade for Windows XP that will retain user’s applications, programs, settings, customizations, personalization and data while setup performing installation of Windows. If you try to upgrade to Windows 7 from a system which is using Windows XP, you will be shown this error report which informs you that direct upgrade from Windows XP to Windows 7 is not available. Once you get a Windows 7 DVD, you will need to do a fresh install on your machine if you are usingWindows XP (although you can upgrade to Vista and then to Windows 7). Microsoft recommends Windows Easy Transfer which can be used to preserve your files and settings from your XP machine, but please note that it will NOT back up and transfer program files and appl...