3

I was having some trouble with R so I thought I'd just remove it and re-install it. So I did:

sudo apt-get remove r-base*

and mindlessly hit return (why??).

I sat there as my system was immediately stripped of the following:

  accountsservice elementary-standard evolution-data-server
  evolution-data-server-online-accounts filelight gcr geary
  gnome-control-center gnome-keyring gnome-settings-daemon indicator-bluetooth
  indicator-datetime indicator-keyboard indicator-sound kde-runtime
  kolourpaint4 kubuntu-debug-installer language-selector-common
  libaccountsservice0 libebackend-1.2-7 libebook-1.2-14
  libebook-contacts-1.2-0 libecal-1.2-16 libedata-book-1.2-20
  libedata-cal-1.2-23 libedataserver-1.2-18 libfolks-eds25 libgcr-base-3-1
  libgcr-ui-3-1 libgdata13 libgoa-backend-1.0-1 libmaya-calendar0
  maya-calendar maya-calendar-plugin-caldav maya-calendar-plugin-google
  midori-granite modemmanager okular oneconf pantheon-shell
  pantheon-xsession-settings python-ubuntu-sso-client qapt-batch r-base
  r-base-core r-base-dev r-base-html r-cran-boot r-cran-class r-cran-cluster
  r-cran-codetools r-cran-foreign r-cran-kernsmooth r-cran-lattice r-cran-mass
  r-cran-matrix r-cran-mgcv r-cran-nlme r-cran-nnet r-cran-rpart
  r-cran-spatial r-cran-survival r-recommended software-center
  switchboard-plug-gcc-bluetooth switchboard-plug-gcc-color
  switchboard-plug-gcc-mouse switchboard-plug-gcc-network
  switchboard-plug-gcc-printer switchboard-plug-gcc-sound
  switchboard-plug-gcc-ua switchboard-plug-gcc-wacom switchboard-plug-locale
  switchboard-plug-useraccounts switchboard-plug-users ubuntu-sso-client

and had the following installed:

  apparmor-easyprof apparmor-easyprof-ubuntu click click-apparmor
  gir1.2-click-0.4 gir1.2-gee-0.8 gir1.2-json-1.0 hud libandroid-properties1
  libboost-program-options1.54.0 libcapnp-0.4.0 libclick-0.4-0 libcolumbus1
  libcolumbus1-common libdbus-cpp2 libdbusmenu-qt5 libdee-qt5-3 libgflags2
  libglewmx1.10 libgoogle-glog0 libgsettings-qt1 libhud-client2 libhud2
  libhybris-common1 libjsoncpp0 liblttng-ust-ctl2 liblttng-ust0
  libmediascanner-2.0-0 libmirclient7 libmirclientplatform-mesa libmirplatform
  libmirplatformgraphics-mesa libmirprotobuf0 libmirserver18 libnux-4.0-0
  libnux-4.0-common libpocketsphinx1 libprocess-cpp1 libprotobuf8
  libqdjango-db0 libqmenumodel0 libqt5core5a libqt5dbus5 libqt5feedback5
  libqt5gui5 libqt5multimedia5 libqt5network5 libqt5organizer5
  libqt5qml-graphicaleffects libqt5qml5 libqt5quick5 libqt5sql5
  libqt5sql5-sqlite libqt5svg5 libqt5widgets5 libqt5xmlpatterns5
  libsphinxbase1 libthumbnailer0 libubuntu-application-api-mirserver1
  libubuntu-location-service0 libubuntu-platform-hardware-api1
  libunity-action-qt1 libunity-api0 libunity-core-6.0-9 libunity-mir1
  libunity-scopes1 libunityvoice1 libunwind8 libupstart-app-launch2 liburcu1
  libusermetricsoutput1 libxcb-icccm4 libxcb-image0 libxcb-render-util0
  libxcb-xkb1 libxkbcommon-x11-0 libzmqpp3 mediascanner2.0 python3-apparmor
  python3-apparmor-click python3-click python3-debian python3-libapparmor
  qmenumodel-qml qtdeclarative5-dee-plugin qtdeclarative5-gsettings1.0
  qtdeclarative5-qtfeedback-plugin qtdeclarative5-qtquick2-plugin
  qtdeclarative5-ubuntu-settings-components
  qtdeclarative5-ubuntu-settings-components-assets
  qtdeclarative5-ubuntu-thumbnailer0.1 qtdeclarative5-ubuntu-ui-toolkit-plugin
  qtdeclarative5-unity-action-plugin qtdeclarative5-unity-notifications-plugin
  qtdeclarative5-window-plugin qtdeclarative5-xmllistmodel-plugin
  sphinx-voxforge-hmm-en sphinx-voxforge-lm-en sqlite3 thumbnailer-service
  ubuntu-ui-toolkit-theme unity-plugin-scopes unity-scope-mediascanner2
  unity-scope-scopes unity-services unity-voice-service unity8 unity8-private
  upstart-app-launch upstart-app-launch-tools usermetricsservice

After it was finished removing whatever it decided to remove, I did:

sudo apt-get install <all packages in the "removed" block>

Apparently it re-installed the removed packages without issues, but now I'm afraid of restarting my system and finding out I bricked it.

I now get the message that all the following can be safely removed via autoremove:

  freeglut3 gir1.2-peas-1.0 gtk3-engines-unico hud libandroid-properties1
  libboost-program-options1.54.0 libcapnp-0.4.0 libcolumbus1
  libcolumbus1-common libdbus-cpp2 libdbusmenu-qt5 libdee-qt5-3 libgflags2
  libglewmx1.10 libgoogle-glog0 libgrip0 libgsettings-qt1 libhud-client2
  libhud2 libhybris-common1 libjsoncpp0 libmediascanner-2.0-0 libmirclient7
  libmirclientplatform-mesa libmirplatform libmirplatformgraphics-mesa
  libmirprotobuf0 libmirserver18 libnux-4.0-0 libnux-4.0-common
  libpocketsphinx1 libprocess-cpp1 libprotobuf8 libqdjango-db0 libqmenumodel0
  libqt5core5a libqt5dbus5 libqt5feedback5 libqt5gui5 libqt5multimedia5
  libqt5network5 libqt5organizer5 libqt5qml-graphicaleffects libqt5qml5
  libqt5quick5 libqt5sql5 libqt5sql5-sqlite libqt5svg5 libqt5widgets5
  libqt5xmlpatterns5 libsphinxbase1 libthumbnailer0
  libubuntu-application-api-mirserver1 libubuntu-location-service0
  libubuntu-platform-hardware-api1 libunity-action-qt1 libunity-api0
  libunity-core-6.0-9 libunity-mir1 libunity-scopes1 libunityvoice1 libunwind8
  libusermetricsoutput1 libxcb-icccm4 libxcb-image0 libxcb-render-util0
  libxcb-xkb1 libxkbcommon-x11-0 libzmqpp3 linux-headers-3.13.0-53
  linux-headers-3.13.0-53-generic linux-headers-3.16.0-34
  linux-headers-3.16.0-34-generic linux-headers-generic-lts-utopic
  linux-image-3.13.0-53-generic linux-image-3.16.0-34-generic
  linux-image-extra-3.13.0-53-generic linux-image-extra-3.16.0-34-generic
  linux-image-generic-lts-utopic linux-signed-image-3.13.0-53-generic
  mediascanner2.0 python-colorama python-distlib python-html5lib python-opengl
  python-wheel qmenumodel-qml qtdeclarative5-dee-plugin
  qtdeclarative5-gsettings1.0 qtdeclarative5-qtfeedback-plugin
  qtdeclarative5-qtquick2-plugin qtdeclarative5-ubuntu-settings-components
  qtdeclarative5-ubuntu-settings-components-assets
  qtdeclarative5-ubuntu-thumbnailer0.1 qtdeclarative5-ubuntu-ui-toolkit-plugin
  qtdeclarative5-unity-action-plugin qtdeclarative5-unity-notifications-plugin
  qtdeclarative5-window-plugin qtdeclarative5-xmllistmodel-plugin
  sphinx-voxforge-hmm-en sphinx-voxforge-lm-en sqlite3 thumbnailer-service
  ubuntu-ui-toolkit-theme unity-scope-mediascanner2 unity-scope-scopes
  unity-services unity-voice-service unity8-private usermetricsservice

which of course I'm too afraid to do.

Is there something I should do? Any recommendations on how to fix this mess? Should I install some other package? Can I autoremove the bazillion packages listed?

2 Answers 2

7

Just to be safe, run the following before rebooting:

sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get install --reinstall elementary-desktop

Good luck!

The best way for you to fix this problem might be to reinstall elementary OS. (You should back up your documents first, even if you plan to reinstall without reformatting.)

If you do want to try to fix the system in place, then look at the package manager's log files to see what packages were removed, and reinstall them:

  • /var/log/dpkg.log (full information, but hard to read)
  • /var/log/apt/history.log (abbreviated by will tell you every package removed or otherwise modified - likely your best bet)
  • /var/log/apt/term.log (if you removed the packages with apt-get in the terminal, this should show what you saw then, including lists of what packages were going to be removed - so this might be the best way)

Blatantly stolen from https://askubuntu.com/a/249372

3
  • Thank you for your help but, are you sure about this? The first line gives me an error, that I should "specify something to reconfigure". Using autoremove will remove a lot of stuff, are you sure that stuff is not important? Did you just create this account to laugh at me? If that's the case, not cool dude. Not cool. o_O
    – Gabriel
    Jul 22, 2015 at 3:35
  • 2
    Sorry about that, that was from memory and incorrect. I updated my answer. Jul 22, 2015 at 3:43
  • 1
    While the original had errors, this now looks okay. Anything autoremove is trying to get rid of is an old dependency and no longer required. You can ask a new question should you be concerned about exactly what is being removed.
    – Lewis Goddard
    Jul 22, 2015 at 8:32
1

I did something very similar but with a different command. I reinstalled all the deleted packages and everything worked again for me. If yours is anything like mine, you shouldn't have to reinstall. I would recommend backing up data before rebooting though just in case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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