From BStegmaier

Jump to: navigation, search

Contents

Commands

  • Up.date package list (without "." - due to a bug in MediaWiki this word cannot be entered)
apt-get up.date
  • Upgrade packages without installing/removing extra packages
apt-get upgrade
  • Upgrade packages install/remove extra packages if needed
apt-get dist-upgrade
  • Search for packages, get informations and dependencies
apt-cache search word
apt-cache show package
apt-cache showpkg package
apt-cache depends package
  • Install a package
apt-get install package
  • Install a certain version
apt-get install package=version
apt-get install package/stable
  • Remove package
apt-get remove package
  • Remove package and its configuration
apt-get --purge remove package
  • List information about installed or removed packages
dpkg --get-selections
  • List all files provided by a package
dpkg --listfiles package
  • Searches a package the file "filename" belongs to
dpkg --search filename

GPG Keys

  • Fetch keys with specified ID
gpg --recv-keys ID
  • and install them
gpg --armor --export ID | apt-key add -

Hold Package

  • Hold package
echo "package-name hold"|dpkg --set-selections
  • Enable updating
echo "package-name unhold"|dpkg --set-selections

Dynamic MMap

  • Increase limit in apt.conf on error "Dynnamic MMap ran out of Memory"
apt.conf
APT::Cache-Limit "16777216";

Periodic Actions

  • Update package list every n days
apt.conf
APT::Periodic::Update-package-Lists "n";
  • Download upgradeable packages every n days but do not install them
apt.conf
APT::Periodic::Download-Upgradeable-Packages "n";

or download and install

apt.conf
APT::Periodic::Unattended-Upgrade "1";
  • Run autoclean every n days
apt.conf
APT::Periodic::AutocleanInterval "n";

Fun

apt-get moo