Hi everyone :)

After installing the emacs package and trying to remove it afterwards:

sudo apt remove --purge --autoremove emacs

It only removed that package and not the other dependencies installed with it (emacs-gtk, emacs-common…). I had to manually remove them one-by-one.

Isn’t that command supposed:

  • remove package
  • it’s configuration files
  • remove unused packages automatically installed ?

What am I missing here?

Also after reading the Stupid things you’ve done that broke your Linux installation post, I read a lot of people messing up their debian system after using the above command… So I assume that’s not the correct way of doing things in Linux?

Some insight from experienced user would be great :)

    • deepdive@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 months ago

      Hi thanks for your quick response !

      I already checked with apt show emacs and the output clearly shows emacs-gtk as depends on. And while installing the emacs package with: sudo apt-get install emacs it installed a ~400Mo package and all dependencies.

      So why doesn’t sudo apt remove --purge --autoremove emacs removes everything ? I thought this command would be the exact opposite of sudo apt install package-name

        • deepdive@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          11 months ago

          Thank you very much for your enlighten answer :D !

          Removing emacs-gtk itself will work as you expect

          Yes that’s what I found out with apt show emacs-gtk, it shows all the dependencies but I found it quiet odd behavior (lack of knowledge).

          I wasn’t aware of metapackages, something new to put into my knowledge database.

          Edit: While writing my replay and searching through the web and my console, even though I wouldn’t have had understood it while reading it… It actually tells me in the description that emacs is a metapackage… Bad reading skills :/ sorry about that !

          Description: GNU Emacs editor (metapackage) GNU Emacs is the extensible self-documenting text editor. This is a metapackage that will always depend on the latest recommended Emacs variant (currently emacs-gtk).


          If you don’t mind I have a last question. Imagine I want to remove docker-ce, which depends on iptables among others, if I sudo apt remove --purge --autoremove docker-ce, this isn’t going to remove iptables and break my system right? Because it’s used by other packages, system… I guess, no?

          I think a more general question would be how can I be sure I not going to fuck my system while removing packages? Maybe I’m to paranoïd and today it’s relatively safe to do so, compared to years ago??

          Thank you :)