Skip to content

Commit

Permalink
clean package cache before making disk image
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Riek committed Sep 17, 2023
1 parent 7e59ac5 commit 7521911
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/config-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ for type in $target; do
chroot ${chroot_dir} /bin/bash -c "depmod -a $(echo "${linux_image_package}" | sed -rn 's/linux-image-(.*)_[[:digit:]].*/\1/p')"
fi

# Clean package cache
chroot ${chroot_dir} /bin/bash -c "apt-get -y autoremove && apt-get -y clean && apt-get -y autoclean"

# Copy kernel and initrd for the boot partition
mkdir -p ${chroot_dir}/boot/firmware/
cp ${chroot_dir}/boot/initrd.img-* ${chroot_dir}/boot/firmware/initrd.img
Expand Down

0 comments on commit 7521911

Please sign in to comment.