I have accidentally deleted all the files in my /usr/share/icons
directory by using a wrong command. Do you know a solution to restore the files?
Asked
Active
Viewed 4,050 times
1
-
1At least tell us the command you used. see http://askubuntu.com/questions/335297/kind-of-messed-up-usr-share-icons seems similar. – Rinzwind Feb 04 '14 at 14:51
-
"supprimed" is not a word. What do you mean? – psusi Feb 04 '14 at 15:07
-
Sorry I mean that I have deleted all my icons by using sudo rm -R /usr/share/icons/. Thanks Rinzwind, your solution worked for me! – emmanuel Feb 06 '14 at 14:12
-
@Rinzwind why a dupe? – Braiam Feb 06 '14 at 23:37
-
I never marked it dupe @Braiam :=) I said similar – Rinzwind Feb 07 '14 at 07:53
1 Answers
2
The command dpkg -S /usr/share/icons/
should show you what package you need to reinstall in order to restore your icons:
➜ ~ dpkg -S /usr/share/icons/
gnome-icon-theme-extras, gimp-data, gnome-colors-common, gnome-brave-icon-theme, alacarte, gnome-online-accounts, smplayer, eog, libreoffice-common, gcr, baobab, gnome-system-log, evince-common, emacs24-common, hicolor-icon-theme, libpeas-common, byobu, desktop-base, icedtea-netx-common, gnome-icon-theme, empathy-common, gnome-session-common, gnome-control-center-data, gnome-settings-daemon, gnome-power-manager, gnome-media, shotwell-common, cabextract, gnome-panel-data, libgweather-common, gnome-disk-utility, imagemagick, gdm3, openjdk-7-jre:i386, gnome-themes-standard-data, gnome-user-share, gparted, rygel, vinagre, cheese-common, gnome-bluetooth, iceweasel, file-roller, xchat, rhythmbox-data, seahorse, deluge-gtk, gnome-packagekit-data, gnome-icon-theme-symbolic, brasero-common, gnome-tweak-tool, aisleriot, gnome-accessibility-themes, ettercap-graphical, pidgin-data, zim, chromium, gconf-editor, dconf-editor, ibus, steam, gbrainy, network-manager-gnome, flashplugin-nonfree, synaptic, geary, tracker-gui, xterm, freeciv-data, gnome-applets-data, gsmartcontrol, wireshark-common, wireshark, upnp-router-control, ppstream, ibus-anthy: /usr/share/icons
Is not an easy task, but it should leave you in the good path. You can reinstall using:
sudo apt-get install --reinstall package

Braiam
- 67,791
- 32
- 179
- 269
-
One-liner for all package reinstall may be used too -
sudo apt-get install --reinstall $(dpkg -S /usr/share/icons | sed -e 's#,##g' | sed "s|: /usr/share/icons||")
. – N0rbert Jun 21 '20 at 08:16