10

I want to remove the pre-installed ImageMagick from my Ubuntu 16.04 LTS. Uninstalling it also removes CUPS and other dependent packages which I want to keep on my system.

Is there a way to remove only ImageMagick without harming its dependencies or without having to reinstall them after their auto-removal?

  • What's the reason behind removing imagemagick? – Raniz Jul 4 '16 at 8:45
  • 1
    I don't want it, I don't need it and it can't be launched. I guess it's a command line tool only, but there are two .desktop-files in the dashs applications section. I want to keep cups and a few other dependent packages without having to reinstall them after removing ImageMagick. – Neni Jul 4 '16 at 8:53
  • 12
    so, basically, you want to remove the wheels from your car, because you don't use them directly, but want to still leave a fully functional car behind? – user260281 Jul 4 '16 at 12:10
  • @Neni Sounds like you do need it. – user253751 Jul 4 '16 at 22:51
  • Related: Bug 1562560 – Eliah Kagan Jan 1 '17 at 14:41
17

ImageMagick is a suite of command line tools and libraries for working with images and packages that depend on it or uses parts of it to function.

Cups uses it for its filters and while it's possible that you don't use any filters that use ImageMagick, I'd recommend that you keep it, because removing it may break Cups.

Now, if you still want to remove it, you can do it like this:

$ sudo dpkg --purge --force-all imagemagick

Note: This will very likely break your system so don't do it!

|improve this answer|||||
17

Some functionality of the dependent packages depend on ImageMagick by definition. This means that the dependent packages (cups etc.) have been built in a way that they require (depend on) ImageMagick to complete certain operations.

So, without a working ImageMagick, cups built by Ubuntu will not work as intended. To make sure all the installed packages work as intended, apt, dpkg and other system tools make sure the packages with unsatisfied dependencies will be deleted from the system.

If you still are certain you don't need ImageMagick on your system, you will have to compile cups and other dependent packages again without linking them against or making them otherwise dependent on ImageMagick. That may or may not be possible using parameters to compilation configuration script (usually invoked by ./configure command). In Ubuntu, maintaining self-built packages is usually not recommended or made particularly easy (you will have to compile the applications again manually to update them, and make sure the applications' dependant packages are compiled again, too).

The practical solutions are using a distribution where self-building applications and handling dependencies across them is meant to be easier for the end-user (Gentoo, Arch, etc.), and alternatively keep using Ubuntu without deleting ImageMagick.

|improve this answer|||||

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.