When I ship a new version of linux, I zip it up and email it to my customer.
They then unzip it with
tar and overwrite the filesystem.
However this is not ideal as there may be files lingering from an older install and so I cant be certain they will have the same filesytem state as I have, after the install.
So I would like to delete the entire filesystem before writing the new one. But of course this will not work as then the 'tar' command will not be able to run.
So could anyone suggest a list of directories I could remove so I can remove as much as possible to get as close as possible to a clean install?
(There might be alternatives to this scheme which I will ask about in another question). Note, it is an embedded sealed product on an internal network. So no Internet, but they can SSH into it, but not remove the sdcard.