How to remove unwanted desktop packages from debian without deleting everything?

6,219

Solution 1

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.

Solution 2

It help me ref:

sudo apt-get remove --purge x11-common
sudo apt-get autoremove
Share:
6,219

Related videos on Youtube

TooTone
Author by

TooTone

I enjoy programming, mathematics and statistics. I'm interested in C++, Scala, R and Python, and I study mathematics in my spare time. (My profile picture is from the Numberline Lane set of childrens' books for learning maths. I can be contacted via outlook.com, username tootone.)

Updated on September 18, 2022

Comments

  • TooTone
    TooTone almost 2 years

    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.

    • cremefraiche
      cremefraiche over 9 years
      All you did was delete you Desktop Environment. Just reinstall xfce4 or another DE and # start lightdm
    • TooTone
      TooTone over 9 years
      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.)
    • cremefraiche
      cremefraiche over 9 years
      xfce4 depends on orage, at least in Ubuntu, so you won't be able to get rid of it if you're keeping xfce.
    • TooTone
      TooTone over 9 years
      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.)
    • cremefraiche
      cremefraiche over 9 years
      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! ;]
    • Chameleon
      Chameleon about 3 years
      I just remove galculator because of speedcrunch and autoremove removes LXDE completely! What a mess!
  • TooTone
    TooTone over 9 years
    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! :)
  • Jaeda
    Jaeda over 6 years
    Is it possible to delete orage without deleting the whole xfce?