diff --git a/src/tufup/client.py b/src/tufup/client.py index 725aa85..595f730 100644 --- a/src/tufup/client.py +++ b/src/tufup/client.py @@ -184,6 +184,11 @@ def check_for_updates( sys.exit() return None # check for new target files (archives and patches) + # look through all files in self.current_archive_local_path.parent, and remove all that is not self.current_archive_local_path + # this is to save space + for file in self.current_archive_local_path.parent.iterdir(): + if TargetMeta(file) < self.current_archive: + file.unlink() logger.debug(f'current archive: {self.current_archive.filename}') all_new_targets = dict( (target_meta, self.get_targetinfo(target_meta))