aboutsummarylogtreecommitdiffstats
path: root/cleanup
blob: 0c5a81ac41370a0554bdd5a082a199be187bc7fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash

#set -o xtrace
set -o errexit -o nounset -o pipefail -o errtrace
IFS=$'\n\t'

# clean up the saved modules

cd /usr/lib/modules/saved-kernel-modules

(
    cd modules
    for i in * ; do
        if [ -L /usr/lib/modules/"$i" ] ; then
            rm -f /usr/lib/modules/"$i"
        fi
    done
)

rm -rf modules/*