I accidentally removed the entire /usr/share/bug directory

You can ask the APT to run a restoration procedure for you. Use commands below:

sudo apt-get update
sudo apt-get install --reinstall $(dpkg -S /usr/share/bug | sed 's/,//g' | sed 's|: /usr/share/bug||g')

where:

  • dpkg -S /usr/share/bug shows the list of comma-separated packages
  • sed 's/,//g' - removes commas
  • sed 's|: /usr/share/bug||g' - removes : /usr/share/bug in the end

Additional notes. If above does not help then you have two options:

  • reinstall packages which have files upper level directory - in /usr/share by

    sudo apt-get install --reinstall $(dpkg -S /usr/share | sed 's/,//g' | sed 's|: /usr/share||g')
    
  • reinstall all installed packages by

    sudo apt-get install --reinstall $(dpkg -l | grep ^ii | awk '{print $2}')
    

Then reboot.