How to uninstall Emacs? (to reinstall it later)

Hello,
I'm having troubles to uninstall Emacs (I'd been trying a bit, mess with it, and wanted to uninstall it, and maybe reinstall it later).

These are the steps I did:

  1. Zorin Sotware manager tool
    There I could not uninstall it for some reason.
  2. So I tried:
    sudo apt remove --purge emacs-bin-common emacs-el emacs-gtk
    which uninstall, I think, some parts.

Now, when I go back to the zorin software manager, I see the following:


and when I type emacs on the search bar, I get

If I click remove nothing happens.
If I click on Source, I have the Flathub and the Zorin OS options.
When, I click on the Zorin option, I get

So, the remove button has disapeared, as for the Flathub.

How can I remove the following?

(This has more to do about learning how to completely remove an application. I have nothing about Emacs)

Kinds Regards

Try

apt list --installed | grep emacs
flatpak list
1 Like

Hi Storm,
This is what I got

There's some left overs from emacs I see. None in flatpak.

sudo apt remove --purge emacs-common emacsen-commoon

should do it

1 Like

I'm getting this message:

Did you add something to your sources.list while installing emacs or other?

1 Like

Intentionnaly, at least, I think I did not.

Okay, well welcome to dependency hell :smiley:
Lets see the source list

cat /etc/apt/sources.list
1 Like

I guess so :slight_smile:

❯ cat /etc/apt/sources.list
#deb cdrom:[Zorin-OS 16 Core 64bit]/ focal main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://es.archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://es.archive.ubuntu.com/ubuntu/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://es.archive.ubuntu.com/ubuntu/ focal-updates main restricted
# deb-src http://es.archive.ubuntu.com/ubuntu/ focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://es.archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://es.archive.ubuntu.com/ubuntu/ focal universe
deb http://es.archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://es.archive.ubuntu.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://es.archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://es.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://es.archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://es.archive.ubuntu.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://es.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://es.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://security.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

That looks normal.

Let's try

sudo apt install libenchant-2-2
1 Like

Done.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libenchant-2-2 is already the newest version (2.2.8-1ubuntu0.20.04.1).
libenchant-2-2 set to manually installed.
The following packages were automatically installed and are no longer required:
  dh-elpa-helper elpa-dash elpa-ghub elpa-git-commit elpa-let-alist elpa-magit
  elpa-magit-popup elpa-treepy elpa-with-editor emacs-common gsfonts
  imagemagick-6-common libcmis-0.5-5v5 libfwupdplugin1 libgit2-28 libgpgmepp6
  libhttp-parser2.9 liblqr-1-0 libm17n-0 libmagickcore-6.q16-6 libmagickwand-6.q16-6
  libmbedcrypto3 libmbedtls12 libmbedx509-0 libotf0 libssh2-1 m17n-db xaw3dg
  zorin-os-feedback
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.

Do I use 'sudo apt autoremove'?

yeah

sudo apt upgrade && sudo apt autoremove
1 Like

Done. I've just rebooted. The icon is gone!

Summary

  1. apt list --installed | grep emacs flatpak list
  2. sudo apt remove --purge emacs-common emacsen-commoon
  3. cat /etc/apt/sources.list
  4. sudo apt install libenchant-2-2
  5. sudo apt upgrade && sudo apt autoremove

Thank you @Storm

2 Likes