Squirrel / Squirrel.Windows

An installation and update framework for Windows desktop apps
MIT License
7.23k stars 1.02k forks source link

Squirrel doesn't clean up previous app version, I want to only keep the app-1.0.2 #1763

Open cioman opened 2 years ago

cioman commented 2 years ago

how to clean up the previous version and only keep the last version image

ksrivastava20 commented 2 years ago

I am also seeing something similar where squirrel is not cleaning up previous versions. I want to keep 2 versions at a time.

caesay commented 2 years ago

Squirrel keeps the current version, and one previous version. It will clean up versions during every update.

The reason app-1.0.0 remains is probably because there was a running process in that directory, or the app directory is otherwise locked during the update, so it was skipped by Squirrel - but clean up will get attempted again the next time you update.

If you check that there are no additional running processes, then perform an update, your old versions should get cleaned up. If this is not the case, please provide Squirrel logs which will include details about the version directory clean up, and any reasons why a folder was not deleted.

ksrivastava20 commented 2 years ago

Thanks @caesay. I found that squirrel is cleaning up old version but since my app- folder contains few .exe's so its just not deleting those .exe's and .dead files. Rest of the files and folders inside app- are cleaned up.

anaisbetts commented 2 years ago

@ksrivastava20 Unfortunately because Squirrel does not have access to MoveFile's "Delete on next reboot" feature (because that requires UAC elevation), we cannot delete these files.