Hi. makepkg deletes the whole $pkgdirbase directory before starting build(). <https://github.com/elieux/pacman/blob/upstream/scripts/makepkg.sh.in#L3460> I propose a change to delete just $pkgdir, and an addition of similar code before starting package*(). I don't see any downside to this (except for the time it takes to implement the change) and I give two reasons for the change: Reason 1: in case $pkgdirbase is a symlink, it gets re-created as a regular directory, which is probably unwanted behavior. The MSYS2 guys even have a patch for this. <https://github.com/elieux/pacman/blob/master/scripts/makepkg.sh.in#L3378-3388> Reason 2: in case makepkg is ran twice in the same directory (but with different configurations and different $pkgname), the second run deletes the $pkgdirbase of the first run, but sometimes it's beneficial to inspect the $pkgdir after makepkg has finished. This may seem as an obscure use-case, but it's very common with the MSYS2 project. <https://github.com/elieux/MSYS2-packages/blob/master/pacman/makepkg-mingw> (Since this seems to be a fairly easy thing to change, I may even prepare a patch myself.) -- David Macek