Score:0

Installed a package with apt-get but cannot remove

in flag

Fresh install of Ubuntu 20.04...

$ which emacs

Was empty.

I installed emacs from apt and it found a very old version. However, I cannot uninstall it as it says it no longer exists.

$ sudo apt-get purge emacs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'emacs' is not installed, so not removed
The following packages were automatically installed and are no longer required:
...
0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.

However, it clearly still exists.

$ which emacs
/usr/bin/emacs

$ emacs --version
GNU Emacs 26.3
Copyright (C) 2019 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

How can I ask ubuntu to remove this package that it says does not exist?

mook765 avatar
cn flag
`emacs` is a metapackage, what you have installed is either `emacs-lucid` or `emacs-gtk`.
Score:1
in flag

To find out which package that binary came from, use the following command:

dpkg -S /usr/bin/emacs
Score:1
sa flag

emacs is a metapackage in Ubuntu 20.04, not a real package, so you can't uninstall it with sudo apt-get purge emacs To uninstall Emacs in Ubuntu 20.04 run the following command:

sudo apt purge emacs-gtk emacs-lucid emacs-nox

Here are the partial results of running sudo apt purge emacs-gtk emacs-lucid emacs-nox in my Ubuntu 22.04 which show that emacs and emacs-gtk packages would be removed:

The following packages will be REMOVED:
  emacs* emacs-gtk*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.

Here are short descriptions of the differences between the three Emacs packages.

  • emacs-gtk: GNU Emacs editor (with GTK+ GUI support)
  • emacs-lucid: GNU Emacs editor (with Lucid GUI support)
  • emacs-nox: GNU Emacs editor (without GUI support)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.