Discussion:
[ubuntu-us-mi] Removing all but current kernel
Robert Citek
2011-06-30 00:24:40 UTC
Permalink
One-liner to removal all but the current installed kernel:

apt-get purge $(
ls /boot/vmlinuz-* |
grep -v $(uname -r) |
xargs -r dpkg -S |
cut -d: -f1 |
sort |
uniq
)

Regards,
- Robert
Wolfger
2011-06-30 11:27:06 UTC
Permalink
Nice!
Post by Robert Citek
apt-get purge $(
ls /boot/vmlinuz-* |
grep -v $(uname -r) |
xargs -r dpkg -S |
cut -d: -f1 |
sort |
uniq
)
Regards,
- Robert
--
ubuntu-us-mi mailing list
ubuntu-us-mi at lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-mi
--
Wolfger

This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 3.0 Unported License.
http://creativecommons.org/licenses/by-nc-sa/3.0/
Jay Wren
2011-06-30 12:51:09 UTC
Permalink
BRILLIANT!

I love this.

Thanks,
--
j
Post by Robert Citek
apt-get purge $(
ls /boot/vmlinuz-* |
grep -v $(uname -r) |
xargs -r dpkg -S |
cut -d: -f1 |
sort |
uniq
)
Regards,
- Robert
--
ubuntu-us-mi mailing list
ubuntu-us-mi at lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-mi
Duane Brown
2011-06-30 16:04:01 UTC
Permalink
yes it is, I was asking Jim, Craig and Robert last night at CHC about
this and he posted it.

On my desktop I have a bunch of old kernels installed and want to do
some housekeeping. He had this ready and obviously was willing to share.

Duane
Post by Jay Wren
BRILLIANT!
I love this.
Thanks,
--
j
Post by Robert Citek
apt-get purge $(
ls /boot/vmlinuz-* |
grep -v $(uname -r) |
xargs -r dpkg -S |
cut -d: -f1 |
sort |
uniq
)
Regards,
- Robert
--
ubuntu-us-mi mailing list
ubuntu-us-mi at lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-mi
Greg Grossmeier
2011-06-30 17:06:19 UTC
Permalink
Thanks! This freed up almost a gig on my laptop!


<quote name="Duane Brown" date="2011-06-30" time="12:04:01 -0400">
Post by Duane Brown
yes it is, I was asking Jim, Craig and Robert last night at CHC
about this and he posted it.
On my desktop I have a bunch of old kernels installed and want to do
some housekeeping. He had this ready and obviously was willing to share.
Duane
Post by Jay Wren
BRILLIANT!
I love this.
Thanks,
--
j
Post by Robert Citek
apt-get purge $(
ls /boot/vmlinuz-* |
grep -v $(uname -r) |
xargs -r dpkg -S |
cut -d: -f1 |
sort |
uniq
)
Regards,
- Robert
--
ubuntu-us-mi mailing list
ubuntu-us-mi at lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-mi
--
ubuntu-us-mi mailing list
ubuntu-us-mi at lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-mi
--
| Greg Grossmeier |
| http://grossmeier.net |
Loading...