Skip to content

Commit

Permalink
Merge pull request #1052 from ceetav/remove-old-kernels
Browse files Browse the repository at this point in the history
centos, rhel, oracle: remove previous kernels to minimize image size
  • Loading branch information
Seth Thomas authored Jun 5, 2018
2 parents c21e1a3 + 8d77117 commit 95709b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions centos/scripts/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ fi

# delete any logs that have built up during the install
find /var/log/ -name *.log -exec rm -f {} \;

# remove previous kernels that yum preserved for rollback
yum install -y yum-utils
package-cleanup --oldkernels --count=1 -y

0 comments on commit 95709b6

Please sign in to comment.