How to Uninstall an Application using the Terminal on Linux Mint

Share
In this tutorial, we'll learn how to uninstall an application using the apt terminal command on Linux Mint.

1: execute the following command [how?] to uninstall Krita, for example, from your PC:

apt remove krita

You'll be asked for your sudoer password.

2: you'll be asked if you want to continue. Type y then press the Enter key to continue. Alternatively, you can simply press the Enter key because "yes" is the default.

Doing this, the Aptitude package manager will uninstall Krita if it's installed, or show an error if it's not installed on your system.

The output of the command apt remove krita in the terminal: a long text that reads: [sudo] password for virtual-curiosities: Reading package lists... Done. Building dependency tree... Done. Reading state information... Done. The following packages were automatically installed and are no longer required: krita-data libebur128-1 libkseexpr-data libkseexpr4 libkseexprui4 liblept5 libmlt++7 libmlt-data libmlt7 libmovit8 libopencv-calib3d406t64 libopencv-contrib406t64 libopencv-dnn406t64 libopencv-features2d406t64 libopencv-flann406t64 libopencv-highgui406t64 libopencv-ml406t64 libopencv-objdetect406t64 libopencv-video406t64 libqt5opengl5t64 libquazip5-1t64 librtaudio6 libsox-fmt-alsa libsox-fmt-base libsox3 libtesseract5 libturbojpeg. Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: krita. 0 upgraded, 0 newly installed, 1 to remove and 136 not upgraded. After this operation, 82,7 MB disk space wlil be freed. Do you want to continue? [Y/n] y. (Reading database ... 785140 files and directories currently installed.) Removing krita (1:5.2.2+dsfg-2build8) ... Processing triggers for gnome-menus (3.36.0-1.1ubuntu3) ... Processing triggers for mate-menus (1.26.1+mint1) ... Processing triggers for libc-bin (2.39-0ubuntu8.3) ... Processing triggers for mailcap (3.70+nmu1ubuntu1) ... Processing triggers for desktop-file-utils (0.27-2build1) ...
What happens when you run apt remove on Linux Mint.

Keep in mind that, apt can only uninstall an application (or, more technically, a package) using the same identifier that was used to install it. In this case, the identifier is krita. If you type it wrong, it won't work.

Warning: never uninstall packages that you haven't personally installed or you don't know the purpose of. On Linux, it's generally possible to uninstall anything from the operating system, including software that will make it impossible for you to keep using the system, e.g. you can uninstall your login screen, and then you'll have trouble starting you desktop environment.

Removing Dangling Dependencies

After you uninstall a package that you previously installed, dependencies that were automatically installed won't be automatically uninstalled. To uninstall them, run the following command:

apt autoremove

This command will find packages that aren't depended upon by any packages you have installed or that the system requires to function and automatically remove them.

Removing User Application Data

In general, uninstalling an application doesn't delete any settings, preferences, or other data that pertains to a user. It only removes the program from the system. In some cases, the amount of data left behind may be significant, and this can accumulate over time.

User data is typically stored in ~/.local/share. For example, if you have Krita installed there will be a ~/.local/share/krita directory with your preferences and any custom brushes you have created, plus many other files.

For example, if you wanted to delete your Krita's preferences, you could simply delete that directory and the next time Krita started up it would assume it just hasn't create the preferences directory yet and would create it with default preferences. Although in this case it might be a better idea to just rename the directory in case something goes wrong, then you can just rename it back.

Written by Noel Santos.

About the Author

I'm a self-taught Brazilian programmer graduated in IT from a FATEC. In a world of increasingly complex and essential computers, I decided to use my technical expertise in hardware, desktop applications, and web technologies to create an informative resource to make PC's easier to understand.

View Comments