release: don't keep old packages if the BRANCH changes
(cherry picked from commit 4231a5e5040403f4ae46a63bf6e1209d5eb7adb8)