14f7b4c3ae2de364523af859766032c2cfdca286
Tech/UbuntuProductivity.md
| ... | ... | @@ -16,21 +16,21 @@ title: UbuntuProductivity |
| 16 | 16 | * Remove old configs in `/var/lib/initramfs-tools` |
| 17 | 17 | * Remove old kernel image packages and files from /boot |
| 18 | 18 | |
| 19 | - #!/bin/bash |
|
| 20 | - CURRENT=$(uname -r) |
|
| 21 | - VERSIONS_TO_PURGE=$(ls /boot/initrd.img-* | grep -v $CURRENT | sed 's/.*initrd.img-// ; s/-generic//' | sort -V | head -n-1) |
|
| 22 | - |
|
| 23 | - for v in $VERSIONS_TO_PURGE |
|
| 24 | - do |
|
| 25 | - rm -i /boot/initrd.img-$v* |
|
| 26 | - done |
|
| 27 | - |
|
| 28 | - for v in $VERSIONS_TO_PURGE |
|
| 29 | - do |
|
| 30 | - echo linux-image-$v-* linux-headers-$v linux-headers-$v-generic linux-modules*-$v-* |
|
| 31 | - done | xargs apt-get --assume-yes purge |
|
| 32 | - |
|
| 33 | - |
|
| 19 | +```bash |
|
| 20 | +#!/bin/bash |
|
| 21 | +CURRENT=$(uname -r) |
|
| 22 | +VERSIONS_TO_PURGE=$(ls /boot/initrd.img-* | grep -v $CURRENT | sed 's/.*initrd.img-// ; s/-generic//' | sort -V | head -n-1) |
|
| 23 | + |
|
| 24 | +for v in $VERSIONS_TO_PURGE |
|
| 25 | +do |
|
| 26 | + rm -i /boot/initrd.img-$v* |
|
| 27 | +done |
|
| 28 | + |
|
| 29 | +for v in $VERSIONS_TO_PURGE |
|
| 30 | +do |
|
| 31 | + echo linux-image-$v-* linux-headers-$v linux-headers-$v-generic linux-modules*-$v-* |
|
| 32 | +done | xargs apt-get --assume-yes purge |
|
| 33 | +``` |
|
| 34 | 34 | |
| 35 | 35 | |
| 36 | 36 | |
| ... | ... | @@ -109,4 +109,4 @@ gsettings set com.canonical.desktop.interface scrollbar-mode normal |
| 109 | 109 | |
| 110 | 110 | [11]: UbuntuProductivity?action=sourceblock&num=1 |
| 111 | 111 | [12]: UbuntuProductivity?action=sourceblock&num=2 |
| 112 | - [13]: http://awesome.naquadah.org/wiki/Quickly_Setting_up_Awesome_with_Gnome |
|
| ... | ... | \ No newline at end of file |
| 0 | + [13]: http://awesome.naquadah.org/wiki/Quickly_Setting_up_Awesome_with_Gnome |