1

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?

Olli
  • 8,971
emmanuel
  • 206
  • 3
  • 5

1 Answers1

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