View difference between Paste ID: iBUquyZY and
SHOW: | | - or go back to the newest paste.
1-
1+
#! /bin/sh
2
#
3
# Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
4
#
5
# This program is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU Library General Public License as published
7
# by the Free Software Foundation; either version 2, or (at your option)
8
# any later version.
9
#
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
# GNU General Public License for more details.
14
#
15
#
16
# Remove unused linux kernel image from system
17
# save it to /usr/bin/purgekernel.sh
18
# Usage: purgekernel.sh <kernelnum>
19
#      where <kernelnum> would be something like 2.6.32-38
20
apt-get --purge remove linux-image-$1-generic linux-headers-$1 linux-headers-$1-generic
21
rm -rf /lib/modules/$1-generic