DynDNS and kernel stripping for Ubuntu
This commit is contained in:
1 parent
5a05bf120a
commit
7deda15585
2 files changed
+43
No files matched your search
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# Remove all but the latest $keep kernels (and headers)
|
||||
#
|
||||
keep=2
|
||||
sudo aptitude purge $(
|
||||
for i in linux-headers-[0-9]*[0-9] linux-headers-[0-9]*generic linux-image-[0-9]* linux-image-extra-[0-9]*; do
|
||||
dpkg -l $i 2>/dev/null | grep ^ii | awk {'print $2'} | grep [0-9] | sort | head -n -${keep};
|
||||
done
|
||||
)
|
||||
Reference in new issue
Block a user