Some Clean Up in Ubuntu 12.10

Stuck somewhere with fricking slow internet connection and my Ubuntu installation is going wonky on me. How come ? I tried OpenStack on Ubuntu yesterday and the installation fscked up my system. Hence, some house cleaning needed.

0. Show boot message and hide splash screen during bootup. My lappy is getting unstable these days. Is nice to see some error message instead of blank screen or stuck loading at splash screen.
$ sudo vi /etc/default/grub
="quiet splash"
GRUB_CMDLINE_LINUX_DEFAULT=

1. Remove the old kernels version. First, automatically through unattended upgrade.
$ sudo vi /etc/apt/apt.conf.d/50unattended-upgrades
# Unattended-Upgrade::Remove-Unused-Dependencies "false";
Unattended-Upgrade::Remove-Unused-Dependencies "true";

Second, directly using apt-get remove. Inspired by the the one-line removal command. Note that I break the command into multiple lines because g+ does not support bloody pre tag !
$ sudo apt-get remove $(dpkg -l \
    | egrep 'linux-(image|headers)-[0-9]' \
    | grep -v `uname -r` \
    | awk '{print $2}')

2. List all recently-used program with last-accessed time (atime) using popularity-contest program and remove them manually.
$ popularity-contest > apps.log
$ less apps.log

No comments:

Post a Comment