Ubuntu – apt-get autoremove dangerous


I was compiling a tool called Rejoystick so I installed a few packages and dependencies. But now I don't need it any more so I removed those packages. Running apt-get shows that I have some packages that are automatically installed and are no longer needed.

But I have a bad experience with apt-get autoremove. It broke my desktop environment when I uninstalled wine some time ago. Luckily, I had a clonezilla partition backup then, but this time, I don't have a backup. So I'm cautious. Running apt-get shows these packages are orphaned

  gir1.2-gtk-2.0 libasound2-dev libavahi-client-dev libavahi-common-dev
  libcaca-dev libcairo-script-interpreter2 libdbus-1-dev libdrm-dev
  libexpat1-dev libfontconfig1-dev libfreetype6-dev libgl1-mesa-dev
  libglu1-mesa-dev libharfbuzz-dev libharfbuzz-gobject0 libice-dev
  libpcre3-dev libpcrecpp0 libpixman-1-dev libpng12-dev libpthread-stubs0-dev
  libslang2-dev libsm-dev libx11-dev libx11-doc libx11-xcb-dev libxau-dev
  libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev
  libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-shm0-dev
  libxcb-sync-dev libxcb-xfixes0-dev libxcb1-dev libxcomposite-dev
  libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev
  libxft-dev libxi-dev libxinerama-dev libxrandr-dev libxrender-dev
  libxshmfence-dev libxxf86vm-dev mesa-common-dev x11proto-composite-dev
  x11proto-core-dev x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev
  x11proto-gl-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev
  x11proto-record-dev x11proto-render-dev x11proto-xext-dev
  x11proto-xf86vidmode-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev

I'm not sure if I should run apt-get autoremove. I was searching details related to each of these packages so that I can understand which ones are needed but they all seem important e.g.


I have Cinnamon, GNOME and Unity installed, I think apt-get autoremove will break something. Any help will be appreciated.

Thanks for reading.

Best Answer

It should be perfectly safe to run sudo apt-get autoremove This should only remove packages that are not in use or needed any longer. If its a necessary package that would "break" your system if removed it shouldn't remove it.

Related Question