I've just installed debian wheezy on an old laptop (using the xfce4 desktop environment via debian-live-7.7.0-amd64-xfce-desktop.iso). I don't intend to use it as an office machine, so I decided to remove the main desktop applications, as, e.g., they keep cropping up in apt-get upgrades:

sudo apt-get remove libreoffice orage brasero exfalso quodlibet gimp imagemagick ristretto xsane

then I cleaned up any dependencies:

sudo apt-get autoremove

I did this via an ssh login from another, client machine as I wanted to navigate the application menus on the old laptop at the same time as typing in the packages to remove.

Only problem is that I didn't look to closely at all the xfce4 packages that I was warned would be removed, and it turns out that I have removed my whole desktop environment! When I saw a message on my client machine

Removing lightdm ...
[ ok ] Stopping Light Display Manager: lightdm.

my old laptop screen went blank! Clearly I have done something very very wrong, although I can't see what.

I have some other debian wheezy machines that I'm using as headless servers, and I'd intended to run the same command line on them once I'd got my old laptop sorted, but I don't want to go ahead until I'm sure I know what I'm doing.

So what did I do wrong, and how should I go about removing these desktop applications without suffering the catastrophic loss of my whole desktop?

Update: it seems if I simulate reinstalling xfce4 via

sudo apt-get install -s xfce4

the only package out of the ones I didn't want that gets reinstalled is orage, the calendar that integrates into the desktop environment.

  • All you did was delete you Desktop Environment. Just reinstall xfce4 or another DE and # start lightdm – cremefraiche Mar 2 '15 at 0:17
  • 1
    My question is really how did I delete my desktop environment? I didn't do remove xfce4 or similar. All I did was remove some applications. (As it happened doing apt-get install xfce4 didn't restore the machine and I couldn't even ssh into it after a reboot.) – TooTone Mar 2 '15 at 0:19
  • 1
    xfce4 depends on orage, at least in Ubuntu, so you won't be able to get rid of it if you're keeping xfce. – cremefraiche Mar 2 '15 at 0:24
  • so if A depends on B, does deleting B automatically delete A? I didn't realise that -- or at least I didn't fully take in the implication that I could brick my system my doing apt-get remove <something-trivial> (By trial and error I've got to the point where I've realised that removing orage is indeed a bad idea but I'm trying to understand why.) – TooTone Mar 2 '15 at 0:25
  • 1
    Yup, once you remove the dependency for a package, the package that depends on it has to go too. I bet next time you'll take a closer look when it asks you if you're sure! ;] – cremefraiche Mar 2 '15 at 0:28
sudo apt-get remove libreoffice orage brasero exfalso quodlibet gimp imagemagick ristretto xsane

orage is an xfce4 dependency in at least Ubuntu, therefore removing orage will also remove xfce. To avoid this, verify the packages that will be removed are the ones you intended when using apt-get remove.

  • 1
    thanks, I've been trying to move from synaptic to command line only and made a really basic error, one I won't make again! :) – TooTone Mar 2 '15 at 21:52
  • Is it possible to delete orage without deleting the whole xfce? – Suncatcher Oct 16 '17 at 11:55

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.