Ubuntu overall is a good distribution, but like all things has its quirks that can crop up from time to time. Most of my issues come from apt being very reminiscent of how RPM was back in 2000-2003, with issues that crop up and can be a royal nightmare to troubleshoot and finally repair. Here are my issues that I have found thru my time as an admin and occasional user of Ubuntu. This is a WIP, and is subject to me having time to collate the code/commands/steps to remedy into a coherent manual. Best of luck!

apt hangs at a kernel upgrade

  1. Use a virtual terminal (important, gnome-terminal or the like will not work correctly) by pressing CTL+ALT+F3
  2. Issue the following commands

    sudo dpkg --configure -a
    sudo apt-get install -f
    sudo apt-get clean
    sudo apt-get update
    
  3. Press ALT+F2 to return to GUI desktop

apt reconfigure fails due to a bad update metadata file

This occurs after an attemt to dpkg --configure -a with the following error:

    dpkg: error: parsing file '/var/lib/dpkg/updates/1234' near line 0:
    newline in field name `#padding'

The exact file in error may vary, but will be at the same path (/var/lib/dpkg/updates/XXXX). The resolution is simply to delete that file.

apt broke nvidia

This one is a common one for me. One must purge then reinstall the appropriate drivers.

  1. Switch to a virtual terminal (CTL+ALT+F3)
  2. Run the following command:

    sudo apt-get purge nvidia-*
    
  3. When completed, return to your GUI desktop (ALT+F2)

  4. Run the program Software & Updates
  5. Navigate to the Additional Drivers tab
  6. Reselect NVIDIA when the system finishes scanning and click apply changes
  7. When the system finishes downloading and installing the drivers, reboot.