Skip to content

Commit

Permalink
match any kernel version in debian purge command (chef#1490)
Browse files Browse the repository at this point in the history
Signed-off-by: Claude Becker <[email protected]>
  • Loading branch information
upekkha authored Mar 22, 2023
1 parent ec404d9 commit 647d206
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packer_templates/scripts/debian/cleanup_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dpkg --list \
echo "remove specific Linux kernels, such as linux-image-4.9.0-13-amd64 but keeps the current kernel and does not touch the virtual packages"
dpkg --list \
| awk '{ print $2 }' \
| grep 'linux-image-[234].*' \
| grep 'linux-image-[1-9].*' \
| grep -v "$(uname -r)" \
| xargs apt-get -y purge;

Expand Down

0 comments on commit 647d206

Please sign in to comment.