When try to uninstall vlc, the option attempt to uninstall complete desktop environment

I'm trying to uninstall vlc and vlc-nox using the following command

apt-get remove --purge vlc libdvdcss2 vlc-nox

But the message that I got is several packages will be uninstalled, too, including kde desktop, as shown below:

The following package will be DELETED

amarok* apper* ark* bluedevil* browser-plugin-vlc* dolphin* gwenview* k3b* kcharselect* kde-baseapps* kde-baseapps-bin* kde-plasma-desktop* kde-runtime* kde-style-oxygen* kde-window-manager* kde-workspace* kde-workspace-bin* kde-workspace-randr* kdebase-runtime* kdepasswd* kdepim-runtime* kdeplasma-addons* kdesudo* kdm* kfind* khelpcenter4* kinfocenter* kio-audiocd* klipper* kmenuedit* kmix* konqueror* konqueror-nsplugins* konsole* kscreen* ksnapshot* ksshaskpass* ksysguard* kwalletmanager* kwrite* libakonadi-calendar4*
libakonadi-contact4* libk3b6* libkcddb4* libkcompactdisc4* libkonq-common* libkonq5abi1* libmarblewidget19* libokularcore5* libsmokekdecore4-3* libsmokekdeui4-3* libsmokekfile3*
libsmokekhtml3* libsmokekio3* libsmokeknewstuff2-3* libsmokeknewstuff3-3* libsmokekparts3* libsmokektexteditor3* libsmokekutils3* libsmokeplasma3* marble-plugins* okular*
okular-extra-backends* phonon* phonon-backend-vlc* plasma-dataengines-workspace* plasma-desktop* plasma-nm* plasma-runners-addons* plasma-scriptengine-python* plasma-scriptengine-ruby* plasma-scriptengine-superkaramba* plasma-scriptengines* plasma-wallpapers-addons* plasma-widget-folderview* plasma-widget-lancelot* plasma-widgets-addons* plasma-widgets-workspace* polkit-kde-1* python-kde4* python3-pykde4* qapt-batch* ruby-kde4* ruby-plasma* software-properties-kde* systemsettings* vlc* vlc-nox* vlc-plugin-pulse*

How can I uninstall vlc and vlc-nox without uninstalling my desktop environment?


The commands apt-cache depends [packagename] and apt-cache rdepends [packagename] can be helpful in discovering what packages are causing a cascading uninstall like this, but I usually use aptitude and the Debian packages site when tracing dependencies. On Debian Jessie, this cascade is triggered by removing vlc-nox:

  1. vlc-nox
  2. phonon-backend-vlc (satisfies phonon-backend)
  3. phonon
  4. amarok / kde-runtime / plasma-widgets-addons / (etc)
  5. kdeplasma-addons / kde-plasma-desktop / plasma-desktop

There are other options for the phonon-backend requirement, so installing either phonon-backend-null or phonon-backend-gstreamer first should prevent the removal cascade:

$ sudo apt-get install phonon-backend-gstreamer

After that, your apt-get remove command should work as expected.


Alternately, it is possible to force removal of specific packages with dpkg. The --force-depends flag turns dependency problems into warnings. This is not recommended and can leave your system broken.

$ sudo dpkg --remove --force-depends [packagename]