Permanent deletion of files and folders

It’s probably not just me who accidentally deletes a file or an entire folder out of distraction. :face_with_peeking_eye:

I think it would be useful if the deletion confirmation dialog could include the option of a double confirmation, or at least insert a short time delay before it accepts the confirmation (a bit like some Firefox windows).

Isn’t that what Trash is already for?

4 Likes

Agree there is already a trash. So this seems not so useful as the action is not completely destructive.

3 Likes

Indeed.

But sometimes you need to actually erase a file, and KDE has a proper menu command to do that: in these cases I guess it would be helpful to be able to trigger an optional second confirmation, to prevent accidental erasings.

Reminds me a bit to the cli rm, which by default when deleting a folder ask for confirmation. Unless you use the -f flag and nowadays many people use a the -f to skip the confirmation to be faster. If we had a double confirmation dialog, you will just quickly click two times on enter because most of the time you really want to delete stuff and then you won’t avoid deleting when this was an error.

1 Like

Perhaps a vote for KDE Welcome:

  1. Welcome screen to re-appear after every update/upgrade
  2. set up snapshots NOW
  3. set up backups NOW.

So many mistakes and issues appear on forums due to people being unable to rewind stupid little problems that should be trivial to resolve with a reboot and/or reinstall then restore from backup…

You know, like ‘copy back your Firefox profile from yesterday’.

More important with KDE because there are many more variables and settings for users to mess up.

I guess it could be implemented as an optional opt-in preference as is the single vs double click option. If that is a common enough issue it would be silly to ignore.

(Personally I rely on trash and in the CLI also trash-cli, and also have automatic daily backups to a remote private location, but not everyone does.)

1 Like

Ah, yes, the classic yes | sudo rm -rf {$mistake_in_the_making} which we’ve all done at some point before :sweat_smile:

(just to clarify, this is not about grimjfoot …it’s an old meme)

1 Like

Couldn’t you give users the ability to activate or deactivate the double confirmation, and insert a little time lag between the first and the second confirmation?

I do regular backups, and usually use the trash can: so I usually recover easily from this kind of mistakes. Still, over the years the number of cases in which I unwillingly erased some stuff is more than zero. That’s why I wanted to “brainstorm” on possible solutions, cause I think I’m not the only one who run into this problem.

You mean like the (optional) email send confirmation in KMail?

This is really silly. If you remove Delete from


then it’ll only appear if you use shift. That’s more than enough for any situation that the developers can prepare for. Having a double-confirmation dialogue is what I’d perhaps except for an ICBM control panel, at most. Even there it’d be overkill, in fact.

Is why there is no solution to this problem. @carl is utterly correct.

3 Likes

It is precisely when you opt for the command not to be displayed in the menu that it becomes easier to fall into the error by distraction: at that point to delete a file you use the keyboard, SHIFT + DEL and ENTER … quickly. But if you have selected the wrong files by mistake, trouble is at hand.
The solution would be the option to trigger a second confirmation, with a short time lag in between (so that a double press of the ENTER key has no effect).
I realise it’s not a fundamental problem, but it seemed like a useful suggestion to help users avoid trouble.

…Then, @grimjfoot, add the option to the context menu if you believe that you’ll somehow accidentally press shift, which is already incredibly improbable.

already demonstrates how to:

I learned the hard way that I shouldn’t permanently delete out of habit. I thought “Damn, if only there was an extra confirmation before deleting.” Then I realized I should just use the trash and unbind the shortcut to delete permanently until I unlearned my habit.

Realistically, there’s no permanent deletion safeguard better than the trash. If you implement extra confirmations or delays, it’ll just annoy people most of the time.

8 Likes

In case anyone is wondering, here’s where you can unbind the shortcut for permanent deletion.

From System Settings:


Screenshot_20230405_100850

Alternatively, from Dolphin:

Screenshot_20230405_101044
Screenshot_20230405_101443

5 Likes

I did think of an additional permanent deletion safeguard that wouldn’t be inconvenient, but I’m not sure if it might have issues in rare situations where quick permanent deletion would actually be needed. Basically, when a user chooses to permanently delete, move the file to the trash and permanently delete it after X amount of time. That way it doesn’t have to be manually permanently deleted from the trash and the user still has time to recover the file if they realized they made a mistake.

I really like this idea.

To me, that doesn’t seem like a very good idea from a security point of view. The user assumes the files are deleted, but they are actually stored in Trash. What happens if the user shuts down the computer before that X amount of time has expired?

Of course, one could argue, if the user really cared about security, he would have overwritten the sectors on the drive with random data after deleting the files, so that they cannot be restored. That’s a valid point, but still, there is the expectation that the command does what it says it does, and not something completely different.

Personally, I’m quite happy with how things are right now in regards to this.

If users truly care about data security to this degree they would use a shredding tool that writes data to the disk in the same location the file existed several times over.

3 Likes