Saturday, January 22, 2022

Ubuntu – Increase number of old kernels to keep on autoremove

So I looked into the script a little bit and some minor changes was enough to get what you want.

First create a backup of: /etc/kernel/postinst.d/apt-auto-removal:

sudo cp /etc/kernel/postinst.d/apt-auto-removal{,.bk}

Then find this line:

previous_version="$(echo "$debverlist" | sed -n 2p)"

and change it to:

previous_version="$(echo "$debverlist" | sed -n 2,4p)"
  • Now it should keep 3 old kernel + Running + Newly installed one
  • Of course you have to run it once manually or install a new kernel to make it take effect.

Thursday, December 16, 2021

Max disk cache size in google chrome

 Google chrome stores cache size as a signed integer, so the maximum size is 2147483647 bytes or just under 2gb.


reset;

/usr/bin/google-chrome %U --disk-cache-dir='/tmp/google-chrome/' --disk-cache-size=2147483647

Sunday, January 31, 2021

systemd-timesyncd

sudo apt update && sudo apt install systemd-timesyncd && sudo systemctl enable --now systemd-timesyncd