There is a cleanup mechanism in the code.
If you create a file called
.txt in the portals/_default folder (like 03.01.00.txt) then it loops through all the files in that file and deletes the files (given the ASP.NET user has the proper permissions) on install.
It should have done that for 3.0.8, 3.0.12 and 3.1.0 .