APT
Configuration
Disable installation of recommended packages by default:
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/99install-recommends
Package pinning example (/etc/apt/preferences.d/90-local):
Package: *
Pin: release a=testing
Pin-Priority: 800
Package: *
Pin: release a=unstable
Pin-Priority: 50
Package: *
Pin: release a=experimental
Pin-Priority: 1
Disabling "valid until" check globally
echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99-no-check-valid-until
Restore original configuration files:
dpkg -i --force-confmiss package.deb
Usage
Updating to newer release
apt-get --allow-releaseinfo-change update
Unmark manually installed package(s)
# apt-mark auto pkgname
Find top-level build dependencies for package:
apt-rdepends --build-depends --follow=DEPENDS PKGNAME
Install older package from the snapshot
# echo "deb http://snapshot.debian.org/archive/debian/20200401T000000Z testing main" >> /etc/apt/sources.list
# apt-get -o Acquire::Check-Valid-Until=false update