meta data for this page
  •  

This is an old revision of the document!


Commandline

Disable fsync

This trick helps on BTRFS FS

apt-get install eatmydata
eatmydata apt-get update

Or wrap some commands permanently with eatmydata

ln -s /usr/bin/eatmydata /usr/local/bin/aptitude
ln -s /usr/bin/eatmydata /usr/local/bin/apt-get
ln -s /usr/bin/eatmydata /usr/local/bin/apt-cache

Playing with apt keys

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 8B48AD6246925553
sudo apt-get install debian-archive-keyring
wget http://ftp.pl.debian.org/debian/pool/main/p/pkg-mozilla-archive-keyring/pkg-mozilla-archive-keyring_1.1_all.deb
sudo dpkg -i pkg-mozilla-archive-keyring_1.1_all.deb
sudo apt-get update
gpg --keyserver pgpkeys.mit.edu --recv-key  8B48AD6246925553      
gpg -a --export 8B48AD6246925553 | sudo apt-key add -
apt-get update 2> /tmp/keymissing; for key in $(grep "NO_PUBKEY" /tmp/keymissing |sed "s/.*NO_PUBKEY //"); do echo -e "\nProcessing key: $key"; gpg --keyserver keyserver.ubuntu.com --recv $key && sudo gpg --export --armor $key | apt-key add -; done

List all package versions

apt-cache policy lxc
lxc:
  Installed: 1:1.0.6-6+deb8u2
  Candidate: 1:1.1.5-1
  Version table:
     1:1.1.5-1 0
        500 http://ftp.pl.debian.org/debian/ stretch/main amd64 Packages
 *** 1:1.0.6-6+deb8u2 0
        100 /var/lib/dpkg/status

Install specified version

apt-get install backupninja=0.9.8.1-1
apt-mark hold backupninja

Install with low prio questions

To change dpkg-configure question priorities:

DEBIAN_PRIORITY=low apt-get install ...

Install from backports

List version and priorities:

apt-cache policy pulseaudio
apt-get install -t jessie-backports pulseaudio
aptitude -t jessie-backports
/etc/apt/preferences.d/backports
Package: *
Pin: release a=jessie-backports
Pin-Priority: 500

Package: *
Pin: release a=stretch-backports
Pin-Priority: 500

Hold package

echo package_name hold | sudo dpkg --set-selections