safe-rm command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
safe-rm: command not found
or when using sudo you get the following error message
sudo: safe-rm: command not found
Solutions to safe-rm: command not found
How To Fix safe-rm: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu safe-rm is provided by safe-rm package.
safe-rm is:
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 list of exclusions for 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.
To fix this problem, we can install more using the command below.
sudo apt-get -y install safe-rm
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install safe-rm.
sudo apt -y install safe-rm
Or if you have aptitude installed you can use the following command.
sudo aptitude install safe-rm
Summary
In this tutorial we learn how to fix safe-rm command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.