1

I gutted my Ubuntu 16.04 by accident. I just managed to get my desktop back but I lack many essential packages, such as gedit, latex, and packages to display graphics in firefox, for example.

I'm having trouble installing these back because I'm stuck in a loop of unmet dependences. Is there a way to restore the core ubuntu 16.04 packages?

The list of everything I killed and haven't restored is

a11y-profile-manager-indicator
account-plugin-facebook
account-plugin-flickr
at
bamfdaemon
baobab
brasero
ca-certificates-java
ca-certificates-mono
caribou
chrome-gnome-shell
cm-super
cm-super-minimal
cmake-data
compiz-gnome
context
context-modules
deja-dup
dleyna-server
feynmf
fonts-crosextra-caladea
fonts-crosextra-carlito
fonts-junicode
fonts-linuxlibertine
freepats
gdm3
gimp
gimp-data
gnome-bluetooth
gnome-control-center
gnome-control-center-data
gnome-disk-utility
gnome-orca
gnome-settings-daemon
gnome-software
gnome-system-log
gnome-user-share
iio-sensor-proxy
indicator-appmenu
indicator-bluetooth
indicator-printers
indicator-stickynotes
java-common
libcddb2
libdca0:amd64
libdirectfb-1.2-9:amd64
libdleyna-core-1.0-3:amd64
libfaad2:amd64
libflac++6v5:amd64
libfreexl1:amd64
libgflags2v5
libgl2ps0
libglib2.0-cil
libgoogle-glog0v5
libgtk2.0-cil
libgtkspell3-3-0:amd64
libhdf4-0-alt
libid3tag0
libmpcdec6:amd64
libofa0:amd64
libogdi3.2
libopenal-data
libopenal1:amd64
libplot2c2
libportmidi0
libportsmf0v5:amd64
libqtassistantclient4:amd64
libreoffice-avmedia-backend-gstreamer
libreoffice-java-common
libresid-builder0c2a
libsbsms10:amd64
libsdl-mixer1.2:amd64
libsdl-ttf2.0-0:amd64
libsidplay2v5
libsmpeg0:amd64
libspandsp2:amd64
libsratom-0-0:amd64
libsuperlu4:amd64
libunity-core-6.0-9:amd64
libunity-misc4
libvamp-hostsdk3v5:amd64
libvcdinfo0
libvlc5
libvlccore8
libvo-aacenc0:amd64
libvo-amrwbenc0:amd64
libwildmidi-config
libwildmidi1:amd64
libxml-commons-resolver1.1-java
libxml-sax-perl
mayavi2
mono-runtime-common
mysql-common
network-manager-gnome
odbcinst
onboard
openjdk-8-jre-headless:amd64
policykit-1-gnome
python-matplotlib-data
python-twisted
python-twisted-core
r-base-core
realmd
shotwell
smartmontools
snapd-login-service
system-config-printer-gnome
telepathy-mission-control-5
tex4ht
tex4ht-common
texinfo
texlive-bibtex-extra
texlive-fonts-extra
texlive-fonts-extra-doc
texlive-formats-extra
texlive-games
texlive-generic-extra
texlive-htmlxml
texlive-humanities
texlive-humanities-doc
texlive-lang-african
texlive-lang-arabic
texlive-lang-cyrillic
texlive-lang-czechslovak
texlive-lang-english
texlive-lang-european
texlive-lang-french
texlive-lang-german
texlive-lang-greek
texlive-lang-indic
texlive-lang-italian
texlive-lang-polish
texlive-lang-portuguese
texlive-lang-spanish
texlive-math-extra
texlive-metapost
texlive-metapost-doc
texlive-music
texlive-omega
texlive-plain-extra
texlive-publishers
texlive-publishers-doc
texlive-science
texlive-science-doc
thunderbird
transmission-gtk
unity
unity-control-center
unity-webapps-common
unity-webapps-service
update-notifier
usb-creator-gtk
velocity
vino
xdg-user-dirs-gtk
xdiagnose

Attempting to install any one of these packages appears to fail in lieu of finding some magic order in which their dependencies are met ..

kpierce@dw7mhal3:~$ sudo apt-get install unity
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies:
 unity : Depends: libnux-4.0-0 but it is not going to be installed
         Depends: libunity-core-6.0-9 (= 7.4.0+16.04.20160415-0ubuntu1) but it is not going to be installed
         Depends: compiz but it is not going to be installed
         Depends: compiz-core-abiversion-20151010
         Depends: libnux-abiversion-20140307.0
         Depends: bamfdaemon
         Recommends: unity-control-center but it is not going to be installed
         Recommends: unity-scope-manpages but it is not going to be installed
         Recommends: unity-scope-calculator but it is not going to be installed
         Recommends: unity-scope-devhelp but it is not going to be installed
         Recommends: unity-scope-firefoxbookmarks but it is not going to be installed
         Recommends: unity-scope-yelp but it is not going to be installed
         Recommends: unity-scope-virtualbox but it is not going to be installed
         Recommends: unity-scope-openclipart but it is not going to be installed
         Recommends: unity-scope-tomboy but it is not going to be installed
         Recommends: unity-scope-colourlovers but it is not going to be installed
         Recommends: unity-lens-photos but it is not going to be installed
         Recommends: unity-scope-chromiumbookmarks but it is not going to be installed
         Recommends: unity-scope-zotero but it is not going to be installed
         Recommends: unity-scope-texdoc but it is not going to be installed
         Recommends: gnome-disk-utility but it is not going to be installed
         Recommends: indicator-appmenu (>= 15.02.0) but it is not going to be installed
         Recommends: indicator-bluetooth but it is not going to be installed
         Recommends: indicator-printers but it is not going to be installed
         Recommends: session-shortcuts but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
2

Try using sudo aptitude install firefox and keep choosing which packages to keep or get rid of until it satisfies the dependencies. You don't have to pick the first choice it gives you.

  • Thanks! Making some progress I think with aptitude on various items picked from among those lost ... – kevinkayaks May 8 at 1:59
  • @krisopher I worked bit by bit with aptitude until I got enough base packages to iterate through my list of old packages and install them all using a script. The distribution is pretty close to the state it was in before my mistake. There are some minor remnant issues.. but I think I'll get there. Thanks! – kevinkayaks May 8 at 23:16
1

Please check your repositories settings first - see this Q&A.

Then proceed with:

  1. Update package lists

    sudo apt-get update
    
  2. Reinstall main system packages:

    sudo apt-get install --reinstall ubuntu-minimal
    
  3. Reinstall the Unity desktop.

    sudo apt-get install --reinstall ubuntu-desktop
    

On errors use

sudo apt-get install -f
sudo dpkg --configure -a

and finally

sudo apt-get dist-upgrade

to get newest dependencies from 16.04 LTS repositories.


If you have any errors - please add them to the question by editing it.

  • Thanks @N0rbert. I got many packages back. I was unfamiliar with ubuntu-minimal: this probably would have been very useful had I not already installed these packages secondhand using aptitude repeatedly – kevinkayaks May 8 at 23:17
0

Honestly it would be faster to just back up your personal files and do a clean install instead of trying to fix a broken install and hoping you don't miss something.

  • have some pretty complicated partition stuff going on which makes that prolly not exactly true – kevinkayaks May 8 at 3:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.