kafak80428 I would like to not only to erase just user files and apps but also completely reinstall the OS and also purge the swap space and boot files etc... and anything else i may have overlooked that may remain.
Would doing a Factory reset and then following the steps to install GrapheneOS via a Chrome based browser achieve ALL of this or only some?
All firmware and software components will be reflashed with pristine, clean and up-to-date versions when you flash GrapheneOS using the web browser based installer or command line based installer. This includes the bootloader, baseband firmware, operating system including all drivers and pre-installed apps, and so on. The unlocking for flashing, and the subsequent relocking when done, will both also trigger full erasure of all user-modifiable partitions. For good measure, perform a reset of mobile connectivity settings and do a full factory reset after having booted the newly flashed GrapheneOS, and then verify the boot hash shown during first screen at startup.
If you are really paranoid the device is compromised, and will just attempt to fake the flashing without actually performing it, hold the power button for at least 30 seconds to trigger a hard reset of the device, and then pause it at the bootloader. That way, you know that when you start the unlocking and flashing, the device is not running any malicious code.
Some storage space won't get erased or overwritten by this process, but generally no code will be executed from that storage space, and no sensitive user files should ever have ended up there. Only history of connected SIM cards and such things.