Arch Linux – How to Restore a Deleted Command

arch linuxpackage-management

I accidentally overwrote the file /usr/bin/mdmon. How can I undo this or reinstall the file?

My system is Arco Linux I3 edition, Macbook Air 2017.

Best Answer

Find out which package the file is a part of, then re-install that package. Arcolinux is an Arch derivative, so it uses the pacman package manager. Type, as root, in a terminal window:

pacman -Qo /usr/bin/mdmon

Say, the file owner / package is mdadm. Reinstall it:

pacman -S --force mdadm
Related Question