User Tools

Site Tools


You are not allowed to perform this action
apt

Apt/DPKG

Cheatsheet

Taking inventory
List installed packages apt list –installed
dpkg-query -l
Finding files/packages
Show files from installed package dpkg -L [PACKAGE]
Show installed package providing a file dpkg -S [PATHTOFILE]
Show any package that would provide a file apt-file find [FILE]
Show contents of .deb file dpkg –contents [DEBFILE]
Downgrading/Installing particular versions
Check out available versions apt-cache showpkg [PACKAGE]
Install particular version apt install [PACKAGE]=[VERSION]
Marking
Mark as automatically installed apt-mark auto [PACKAGE]
Mark as manually installed apt-mark manual [PACKAGE]
Hold currently installed version apt-mark hold [PACKAGE]

Backports

  1. Edit /etc/apt/sources.list
  2. E.g., for Debian bookworm, add
    deb http://deb.debian.org/debian bookworm-backports main contrib non-free

Adding "testing" repository, and getting your priorities right

  1. Edit /etc/apt/sources.list
  2. Add these lines:
    deb http://deb.debian.org/debian testing main contrib
    deb http://deb.debian.org/debian unstable main contrib
  3. Create a new file in /etc/apt/apt.conf.d/, i.e. 80testing
  4. Insert this to make stable the default source for packages (unless you want the entire system on testing):
    APT::Default-Release "/^bookworm(|-security|-updates)$/";

    Take note which mainline repositories you have actually included. You wouldn't want to miss bookworm-security, for example.

Building packages

apt.txt · Last modified: by wolfo

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki