There are three primary approaches to editing .sav files, depending on the technical proficiency of the user and the specific software involved.
Always use the application’s own API (SPSS syntax, PSPP, pyreadstat with copy) to make changes. Direct filesystem edits lead to metadata corruption — specifically, corruption of the dictionary header, which renders variable labels unreadable. How To Edit Active Sav File
Or save as a new version: