Save all or some of the files to persist data in the new forms.
Remove those items from the data map.
187357
@RequirePOST
    public HttpResponse doUpgrade(StaplerRequest req, StaplerResponse rsp) {
        final String thruVerParam = req.getParameter("thruVer");
        final VersionNumber thruVer = thruVerParam.equals("all") ? null : new VersionNumber(thruVerParam);

        saveAndRemoveEntries(new Predicate<Map.Entry<SaveableReference, VersionRange>>() {
            @Override
            public boolean apply(Map.Entry<SaveableReference, VersionRange> entry) {
                VersionNumber version = entry.getValue().max;
                return version != null && (thruVer == null || !version.isNewerThan(thruVer));
            }
        });

        return HttpResponses.forwardToPreviousPage();
    }
1227596
def _save_params(self):
        
        self.model.save_params_to_file(self.current_params_fname)
        utils.cleanup_params_files(self.model.output_dir, self.max_params_files_to_keep, self.state.checkpoint,
                                   self.state.best_checkpoint, self.keep_initializations)
1297058
function savePersistentData()
    {
        $this->HTTP->setSessionVariable( $this->StorageName . $this->MetaDataName, $this->MetaData );
        $this->HTTP->setSessionVariable( $this->StorageName . $this->VariableListName, $this->VariableList );
    }
1205110
public function clear() {
		$fileEngine = $this->getFileEngine();
		$fileEngine->removeAll();
		if (!$this->tm->hasOpenTransaction()) {
			$fileEngine->flush();
		}
	}
822404
def save_all(self):
        
        for index in range(self.get_stack_count()):
            if self.data[index].editor.document().isModified():
                self.save(index)
1059033
def save(self, banks_manager):
        
        self.banks_files.delete_all_banks()
        self.banks_files.save(banks_manager)
        self.index_file.save(banks_manager)
477187
function saveFile() {
      if (currentFile) {
        if (!currentFile.oldName) {
          currentFile.oldName = possibleOldName;
        }

        if (!currentFile.newName) {
          currentFile.newName = possibleNewName;
        }

        if (currentFile.newName) {
          files.push(currentFile);
          currentFile = null;
        }
      }

      possibleOldName = undefined;
      possibleNewName = undefined;
    }
914341
private function _save() {
    unlink($this->path);
    file_put_contents($this->path,join('\n',$this->htpwd));
  }
925916
private function appendCollectedFileAndChanges(): void
    {
        if (!empty($this->currentFile)) {
            foreach ($this->currentChanges as $change) {
                $this->currentFile->addChange($change);
            }
            $this->files[] = $this->currentFile;
        }
        $this->currentChanges = [];
    }
332936
def save(self):
        
        if self.mode in ("wb+", 'rb+'):
            if not self.is_open:
                raise IOError("file closed")
            self.write_reference_properties()
            self.manager.write_objects()
237995
def delete_all_banks(self):
        
        for file in glob(str(self.data_path) + "/*.json"):
            Persistence.delete(file)
235661
def save_formset(self, request, form, formset, change):
        
        formset.save()

        for form in formset.forms:
            if hasattr(form, 'nested_formsets') and form not in formset.deleted_forms:
                for nested_formset in form.nested_formsets:
                    self.save_formset(request, form, nested_formset, change)
1004204
def _save(execute_hooks = true)
      loaded_entries = self.loaded_entries
      loaded_entries.each { |resource| set_default_attributes(resource) }
      @removed.clear
      loaded_entries.all? { |resource| resource.__send__(execute_hooks ? :save : :save!) }
    end
118759
public void clearSavedFields() {
    append = null;
    tokenToName = new LinkedHashMap<String, Navigation>();
    nameToToken = new LinkedHashMap<String, Navigation>();
    remainingMappings = new ArrayList<Navigation>();
  }
1200102
public function clear()
    {
        if (!empty($this->files)) {
            $fs = new FileSystem();
            foreach ($this->files as $file) {
                $fs->remove($file);
            }
        }
    }
1363251
public function clear()
    {
        $this->id = null;
        $this->locale = null;
        $this->description = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->applyDefaultValues();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
404995
def save(self):
        """"""

        # first call save with commit=False for all Forms
        for form in self._forms:
            if isinstance(form, BaseForm):
                form.save(commit=False)

        # call save on the instance
        self.instance.save()

        # call any post-commit hooks that have been stashed on Forms
        for form in self.forms:
            if isinstance(form, BaseForm):
                if hasattr(form, 'save_m2m'):
                    form.save_m2m()
                if hasattr(form, 'save_related'):
                    form.save_related()

        # call save on any formsets
        for form in self._forms:
            if isinstance(form, BaseFormSet):
                form.save(commit=True)

        return self.instance