Since you can restore files this way, how can you actually permanently delete a file? Clearing its contents wouldn’t work because then you could just go back in the history anyway.
Why would you want to permanently delete a file?
Deleting normally is fine; if you want to restore it then sure, if not, don’t do anything.
There’s not necessarily a practical use, other than to permanently troll your friends.
But why can’t you though?
I mean, it would be nice to permanently delete a file, now to come to think of it. Let’s say you made a file, coded in a file, then realised you don’t need it, so you delete it. Later, you realise that you actually need it, so you create it, but you want to code it over, however it gives the previous code.
Well you could just erase its contents, but then still the History remains (that’s the big problem).
The only use I can think of is permanently removing leaked credentials. The only way I can think of doing this is porting all the files over to a different repl, then make it run
kill 1 as it starts up (you can do this in replit.nix), then deleting the repl
.replit, and that doesn’t work. After it restarts a few times, it just stops doing so.
I just tested and running
shred -vfz "name of file.extension"; rm -f "name of file.extension" in Shell prevents it from being restored. This not only removes the file but actually overwrites it with zeros three times thus making it incredibly difficult (nigh impossible) to recover. If three times is not good enough, use
shred -vfz -n 10 "name of file.extension"; rm -f "name of file.extension" to overwrite it with zeroes ten times (or replace the
10 with some other number to do it even more times). Anyways this should permanently and irreversibly delete any file on a Linux system, including Replit repls.
When you create a new file with the same name as the deleted file, its history shows 0 changes.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.