Topic: How to update&clean the system
Hi everybody!
I usually run this script for updating and cleaning the system..
What do you think about? Would you add or remove something?
Here the code..
#!/bin/bash
apt-get update
apt-get dist-upgrade -y
apt-get upgrade -y
apt-get install -f
apt-get autoclean
apt-get autoremove -y
apt-get clean
dpkg --purge `COLUMNS=300 dpkg -l "*" | egrep "^rc" | cut -d" " -f3`
echo -n "# Remove old kernels "
dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get --dry-run remove
dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y removeThx in advance for any suggestion!