Please help to restore /usr/share/*

Hi All,
I am a newbie on Mate,
I’m using Mate 15.04 64bit
I accidently removed /usr/share/*
Please help/solution to restore.

Thanks and Regards

If you have removed the entire usr/share folder from your main file-system, I think you may have to do a full re-install. I am not certain of this, however, so you might want to wait for someone more knowledgeable than me to confirm

1 Like

thanks for reply,
I deleted directories from a* to d*
System still running,

edited: i have just run command
dpkg-query -S /usr/share/* | sed -e “s/:.*$//” -e “s/,//g” | xargs sudo aptitude reinstall

after download , reinstall …

E: Internal Error, No file name for desktop-file-utils:amd64

xargs: sudo: exited with status 255; aborting

A fresh re-install would be the most reliable thing to do, since you’ve erased essential data for your applications (icons and themes is one example). The actual binaries will be in other places, like /bin and /usr/bin, so the system isn’t unusable yet.

Providing you haven’t written too much in the hard drive in the meantime, the data can be recovered using software.

There is a utility called testdisk, I have written a tutorial in the Tips & Tricks area of this form, originally in mind for this thread.

If recovery is a success, you can move/copy these files back to /usr/share/ where they belong. :smile: :thumbsup:

sudo mv /tmp/recovered_files/* /usr/share/

As mentioned previously, a fresh re-installation is always recommended.

hi Lah7,
Got it and thanks,
test disk is built-in, but i can’t run it, may be some problems after remove /usr/share/*
I’m backup data and config files to re-install my system.

Many thanks and Regards