File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -306,17 +306,25 @@ _cleanup_common () {
306306
307307 # Delete pacman database sync cache files (*.tar.gz)
308308 [[ -d " ${airootfs_dir} /var/lib/pacman" ]] && find " ${airootfs_dir} /var/lib/pacman" -maxdepth 1 -type f -delete
309+
309310 # Delete pacman database sync cache
310311 [[ -d " ${airootfs_dir} /var/lib/pacman/sync" ]] && find " ${airootfs_dir} /var/lib/pacman/sync" -delete
312+
311313 # Delete pacman package cache
312314 [[ -d " ${airootfs_dir} /var/cache/pacman/pkg" ]] && find " ${airootfs_dir} /var/cache/pacman/pkg" -type f -delete
315+
313316 # Delete all log files, keeps empty dirs.
314317 [[ -d " ${airootfs_dir} /var/log" ]] && find " ${airootfs_dir} /var/log" -type f -delete
318+
315319 # Delete all temporary files and dirs
316320 [[ -d " ${airootfs_dir} /var/tmp" ]] && find " ${airootfs_dir} /var/tmp" -mindepth 1 -delete
321+
317322 # Delete package pacman related files.
318323 find " ${build_dir} " \( -name ' *.pacnew' -o -name ' *.pacsave' -o -name ' *.pacorig' \) -delete
319324
325+ # Delete all cache file
326+ [[ -d " ${airootfs_dir} /var/cache" ]] && find " ${airootfs_dir} /var/cache" -mindepth 1 -delete
327+
320328 # Create an empty /etc/machine-id
321329 printf ' ' > " ${airootfs_dir} /etc/machine-id"
322330
You can’t perform that action at this time.
0 commit comments