Install safe-rm by entering the following commands in the terminal:
sudo apt update sudo apt install safe-rm
Description:
wrapper around the rm command to prevent accidental deletions
This package provides a tool intended to prevent the accidental deletion of important files by replacing rm with a wrapper, which checks the given arguments against a configurable blacklist of files and directories that should never be removed. . Users who attempt to delete one of these protected files or directories will not be able to do so and will be shown a warning message instead. . Protected paths can be set both at the site and user levels.
Homepage: https://launchpad.net/safe-rm
Version: 0.12-2
Section: universe/utils