very stupid mistake: a part of /usr is deleted

Ivan Voras ivoras at
Wed Sep 15 15:20:43 UTC 2010

On 09/15/10 15:36, Zara Kanaeva wrote:
> Hi all,
> vor 2 hours i made a very stupid mistake: i have deleted (as root
> naturally) a part of /usr-directory. I have definitely deleted .snap and
> presumably 100-150 files in /usr/bin.

> uname -a ->
> Sat Nov 21 15:02:08 UTC 2009
> root at amd64

That is actually an easy situation to recover, you can do it in at least 
these ways:

1) if you build/upgrade from source, you can either reinstall if you 
have working /usr/obj or try and rebuild them if you have working /usr/src

2) if you have another machine with the same FreeBSD version and 
architecture, simply copy the missing files (with tar, scp, ftp, 
fetch/wget, etc...)

3) if you have networking and at least working fetch / ftp / wget, cat 
and tar, you can fetch the files at and 
use to reinstall the base binaries

Remember that those files are not magical, you can restore them any way 
you are able. You can even boot the live CD (from, mount 
the appropriate file system and copy the files from the CD.

More information about the freebsd-stable mailing list