====== 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 =====
- Edit ''/etc/apt/sources.list''
- 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 =====
- Edit ''/etc/apt/sources.list''
- Add these lines: deb http://deb.debian.org/debian testing main contrib
deb http://deb.debian.org/debian unstable main contrib
- Create a new file in ''/etc/apt/apt.conf.d/'', i.e. ''80testing''
- 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 =====