"How to edit/extract/repack puppy_fossapup64_9.5.sfs ? I want to extract this file and update the contents."
Usually those are two different procedures. To extract the contents of an sfs (squashed/compressed file system) there are bash command I don't know. What I do is LEFT-Click the SFS, select View Contents, which actually mounts the file-system so that it can be copied into another folder I've created and named, for example, puppy_fossa64. Left-Clicking the SFS unmounts it; but I now have all its files in the folder which can be edited and eventually repacked by Right-clicking the folder and selecting dir2sfs.
Keep in mind that the applications/files you are interested in are in two places: on storage from which they were copied into RAM or mounted and in RAM. The base/core sfs (e.g. fossapup64_9.5.sfs) has been copied into RAM. Unless you duplicate it and work on the duplicate, you are only working on the files in RAM. That work will either evaporate on reboot/shutdown; or be copied into a SaveFile/Folder when a Save is executed.
The problem is that deletions have to be done manually, referring to the catalog listing each application's files in either/or both /root/.packages or /var/packages. Such manual operation does not provide a safety check when one or more of the files used by an application I don't want is also used by an application I do want. Similarly, new applications have to be extracted and their contents manually copied into their proper locations before running the dir2sfs routine.
I haven't used it but in the nicOS-utility-Suite, https://www.forum.puppylinux.com/viewto ... 983#p12983 are 'Right-Click Tool's', among which IIRC is one for editing SFSes. That may ease the manual process. I assume, however, that you would use it on a duplicate of rather than the core.sfs then in use by the Puppy you're running.
What you really seem to be trying to accomplish is referred to as a Remaster. There are several tools to do that. Obviously PPM Uninstall will uninstall applications you've installed into the SaveFile/Folder. Menu>Setup>Remove Builtins --while it doesn't actually remove anything-- writes a 'white-out' file in the SaveFile/Folder adjacent to files which are no longer to be used. When you run a remaster application --the one's in the nicOS-Suite are recommended, the one 'built-in' is NOT-- the white-outs are honored and the whited-out files are not included in the Remaster. Remove-builtins will warn you when removal may break something. [My guess is that Remove-builtins reads the aforementioned 'packages' files, but not only those of relating to the application to be removed but all so as to know when a file is used by more than one application].
If you're intention is to upgrade rather than just remove, the better way is to just install the new version (update/upgrade) of an application, SAVE it, than do a remaster. Remastering gives priority to the files/applications in a SaveFiie/Folder over those 'builtin': the new version rather than the old will be in the remaster.
[Remove builtins before updating is a waste of effort and might leave a white-out breaking the application in the remaster].
Another application you may find useful is gnewpet. https://www.forum.puppylinux.com/viewto ... 211#p73211. If you have any doubts whether or not to remove a builtin, or if removal will break something, run gnewpet before removal. gnewpet will capture all the files of an application as a pet you can store and re-install or decompress and access files you discover are actually needed by other applications.
Many of use like to run without using a SaveFile/Folder. But creating one during the remaster process is just part of the process. When its finished the SaveFile/Folder is no longer used so is deleted.