diff --git a/part-rebuild.py b/part-rebuild.py index 0d42373..ea4a765 100755 --- a/part-rebuild.py +++ b/part-rebuild.py @@ -38,3 +38,7 @@ for index, partition in enumerate(partitions): # Then reassemble them into a new image using those squeezed partition images. open(RAW, "w").close() subprocess.run(["systemd-repart", "--size=auto", "--empty=allow", "--dry-run=no", "--definitions=mkosi.repart-rebuild", "--root", os.getcwd(), RAW], check=True) + +# Clean up the partitions again +for partition in partitions: + os.remove(f"{partition["name"]}.raw")