0

I've recently installed an image editor, "ImageMagick" through Ubuntu Software.

Unfortunately it wasn't really what I needed so no need in keeping it around.

Trying to keep things clean, went on Terminal and "sudo apt purge imagemagick".

Operation was successful and terminal displayed the message that the package was removed.

After a reboot, to my surprise Imagemagick was still present in the app list and working.

Checked the Ubuntu Software Center and it still was displayed as installed.

Got on Terminal again and repeated the "sudo apt purge imagemagick" and got the message that the package wasn't installed.

Went back to Ubuntu Software Center where it still was displayed as being installed.

Hit the remove button and it was then removed.

What just happened? Were there two different installs? Doesn't "apt remove/autoremove/purge" has control over the whole system, including Sotware Center installations? How come do I remove a package manually and it still keeps on lingering over the system? How many more packages and trash do I have lingering over the system if things like this happen?

Thanks in advance to anyone who can clarify this.

10
  • Maybe you had installed both a .deb and a snap version of the package ? – Soren A Mar 28 at 10:53
  • Hi to be sure a package is fully and complete removed you shroud always try to remove it the same way you installed it/ You said installed from software center would have been best to remove it that way. – David Mar 28 at 10:54
  • Soren A., negative. Installed it through the Ubuntu Software Center. – Green Banana Mar 28 at 10:57
  • David, had I tried to remove it through the Ubuntu Software Center none of the user and configuration files would have been removed therefore leaving orphaned files scattered around. Plus, it doesn't make sense for an apparently system wide command like "sudo apt remove" not having control over Ubuntu Software Center too. – Green Banana Mar 28 at 10:57
  • imagemagick is a dummy package which can be removed safely without removing the application which is on my system the package imagemagick -6-q16. The correct command to remove imagemagick from your system would have been sudo apt purge --autoremove imagemagick-6-q16. Please also remind that user configurations (in your home directory) will never get removed , neither by apt nor by software center, you always have to remove them manually. – mook765 Mar 28 at 11:08
1

The package imagemagick is a dummy package which can safely be removed or purged without actually removing the application itself.

The essential package you'd have to purge is imagemagic-6.q16 (on 20.10, if you use a different version of Ubuntu this will vary), thus the correct command to purge the application would have been

sudo apt purge --autoremove imagemagick-6.q16

We use purge because we don't want to keep configuration files and --autoremove to prevent that not longer needed dependencies are left behind.

Remind that purge only affects system-wide configuration files, user configuration files (which reside in your home directory) will never get removed, neither by apt nor by software center, you always have to remove these files manually.

If you want to know exactly, which packages have been installed/removed during the installation/uninstallation of imagemagick, check the log files /var/log/apt/history.log or /var/log/apt/term.log.

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.