diff --git a/cache/cache.go b/cache/cache.go index 3c5d1ff..db0fb21 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -64,7 +64,11 @@ func DownloadQemuImage(path, file string) (err error) { } err = unpackTar(resp.Filename, path) - return + if err != nil { + return + } + + return os.Remove(resp.Filename) } func DownloadDebianCache(cachePath string) (err error) {