"emacs" package does not uninstall fully

Bug #189798 reported by Vadim Peretokin
6
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
Undecided
Unassigned
emacs22 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: emacs

When you install the emacs package, it install 67mb of other packages (emacs common and such). However when you uninstall it, it -only- uninstalls the emacs package, which is like 40kb. So you still have 67mb worth of packages on your system. Doing apt-get autoremove fails to detect those packages - the only way to fix this is to manually remove those packages. Not good.

Here's the info required:

vadi@vadi-laptop:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"
vadi@vadi-laptop:~$ dpkg -l emacs | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
pn emacs <none> (no description available)
vadi@vadi-laptop:~$

description: updated
description: updated
description: updated
Revision history for this message
era (era) wrote :

Sounds like a bug in apt-get, but just to get things started, could you attach and/or excerpt the relevant parts from your /var/lib/dpkg.log* so we can see what exactly was installed and not removed?

PS. Can't resist:

 > | cat

*bing* you are a winner! http://www.iki.fi/era/unix/award.html

Revision history for this message
Tollef Fog Heen (tfheen) wrote :

You need to use apt-get autoremove to remove unused packages from the system; this is in any case not a bug in emacs, but would be in either apt or whatever package management tool you are using.

Changed in emacs22:
status: New → Invalid
Revision history for this message
Vadim Peretokin (vperetokin) wrote :

I'm sorry, but did you take time to read my description?

"Doing apt-get autoremove fails to detect those packages - the only way to fix this is to manually remove those packages."

I did do autoremove afterwards, it failed to detect them.

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

Which one exactly did you want?

"
vadi@vadi-laptop:/var/lib/dpkg$ ls
alternatives cmethopt info statoverride status-old
available diversions lock statoverride-old triggers
available-old diversions-old parts status updates
"

Revision history for this message
era (era) wrote :

Sorry, I meant /var/log/dpkg.log* but probably not the full files. Or perhaps you can attach them in full but indicate roughly where to start looking (i.e. the date and time you installed and removed emacs; look in the files, they have date and time stamps). Apologies for the false start.

Revision history for this message
Vadim Peretokin (vperetokin) wrote : Re: [Bug 189798] Re: "emacs" package does not uninstall fully
Download full text (11.9 KiB)

Here are the starting and the ending relevant sections:

2008-02-06 15:29:04 install emacsen-common <none> 1.4.17
2008-02-06 15:29:04 status half-installed emacsen-common 1.4.17
2008-02-06 15:29:04 status unpacked emacsen-common 1.4.17
2008-02-06 15:29:04 status unpacked emacsen-common 1.4.17
2008-02-06 15:29:04 install emacs22-common <none> 22.1-0ubuntu5.1
2008-02-06 15:29:04 status half-installed emacs22-common 22.1-0ubuntu5.1
2008-02-06 15:29:09 status unpacked emacs22-common 22.1-0ubuntu5.1
2008-02-06 15:29:09 status unpacked emacs22-common 22.1-0ubuntu5.1
2008-02-06 15:29:09 install liblockfile1 <none> 1.06.2
2008-02-06 15:29:09 status half-installed liblockfile1 1.06.2
2008-02-06 15:29:09 status unpacked liblockfile1 1.06.2
2008-02-06 15:29:09 status unpacked liblockfile1 1.06.2
2008-02-06 15:29:10 install emacs22-bin-common <none> 22.1-0ubuntu5.1
2008-02-06 15:29:10 status half-installed emacs22-bin-common 22.1-0ubuntu5.1
2008-02-06 15:29:10 status unpacked emacs22-bin-common 22.1-0ubuntu5.1
2008-02-06 15:29:10 status unpacked emacs22-bin-common 22.1-0ubuntu5.1
2008-02-06 15:29:10 install emacs22-gtk <none> 22.1-0ubuntu5.1
2008-02-06 15:29:10 status half-installed emacs22-gtk 22.1-0ubuntu5.1
2008-02-06 15:29:10 status unpacked emacs22-gtk 22.1-0ubuntu5.1
2008-02-06 15:29:10 status unpacked emacs22-gtk 22.1-0ubuntu5.1
2008-02-06 15:29:10 install emacs <none> 22.1-0ubuntu5.1
2008-02-06 15:29:10 status half-installed emacs 22.1-0ubuntu5.1
2008-02-06 15:29:10 status unpacked emacs 22.1-0ubuntu5.1
2008-02-06 15:29:11 status unpacked emacs 22.1-0ubuntu5.1
2008-02-06 15:29:13 startup packages configure
2008-02-06 15:29:13 configure emacsen-common 1.4.17 1.4.17
2008-02-06 15:29:13 status unpacked emacsen-common 1.4.17
2008-02-06 15:29:15 status unpacked emacsen-common 1.4.17
2008-02-06 15:29:15 status unpacked emacsen-common 1.4.17
2008-02-06 15:29:15 status half-configured emacsen-common 1.4.17
2008-02-06 15:29:16 status installed emacsen-common 1.4.17
2008-02-06 15:29:16 configure emacs22-common 22.1-0ubuntu5.1 22.1-0ubuntu5.1
2008-02-06 15:29:16 status unpacked emacs22-common 22.1-0ubuntu5.1
2008-02-06 15:29:16 status half-configured emacs22-common 22.1-0ubuntu5.1
2008-02-06 15:29:19 status installed emacs22-common 22.1-0ubuntu5.1
2008-02-06 15:29:19 configure liblockfile1 1.06.2 1.06.2
2008-02-06 15:29:19 status unpacked liblockfile1 1.06.2
2008-02-06 15:29:19 status half-configured liblockfile1 1.06.2
2008-02-06 15:29:19 status installed liblockfile1 1.06.2
2008-02-06 15:29:19 configure emacs22-bin-common 22.1-0ubuntu5.1
22.1-0ubuntu5.1
2008-02-06 15:29:19 status unpacked emacs22-bin-common 22.1-0ubuntu5.1
2008-02-06 15:29:19 status half-configured emacs22-bin-common
22.1-0ubuntu5.1
2008-02-06 15:29:20 status installed emacs22-bin-common 22.1-0ubuntu5.1
2008-02-06 15:29:20 configure emacs22-gtk 22.1-0ubuntu5.1 22.1-0ubuntu5.1
2008-02-06 15:29:20 status unpacked emacs22-gtk 22.1-0ubuntu5.1
2008-02-06 15:29:20 status half-configured emacs22-gtk 22.1-0ubuntu5.1
2008-02-06 15:29:23 status installed emacs22-gtk 22.1-0ubuntu5.1
2008-02-06 15:29:23 configure emacs 22.1-0ubuntu5.1 22.1-0ubuntu5.1
2008-02-06 15:29:23 status unpacked emacs 22.1-0u...

Revision history for this message
Tollef Fog Heen (tfheen) wrote :

* Vadim Peretokin

| I'm sorry, but did you take time to read my description?

Not fully no, sorry about that. Did you read my full reply where I
said it was not a bug in emacs, but apt or whatever apt frontend you
are using?

--
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are

Revision history for this message
era (era) wrote :

On Fri, 08 Feb 2008 07:54:00 -0000, "Tollef Fog Heen"
<email address hidden> said:
> Not fully no, sorry about that. Did you read my full reply where I
> said it was not a bug in emacs, but apt or whatever apt frontend you
> are using?

Tollef: it's a bug, let's just be grateful it was reported, and see
which package's bugs it should properly be routed to. I'd imagine
apt-get autoremove is actually to blame here, but I don't have the time
to work on reproing and diagnosing it.

/* era */

--
If this were a real .signature, it would suck less. Well, maybe not.

Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

I can not confirm this bug. Is this a bug for anyone anymore in Hardy or Intrepid?

Below is my terminal log:

greg@foucault:~$sudo apt-get install emacs
[sudo] password for greg:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  emacs22-bin-common emacs22-common emacs22-gtk emacsen-common
Suggested packages:
  emacs22-el
The following NEW packages will be installed:
  emacs emacs22-bin-common emacs22-common emacs22-gtk emacsen-common
0 upgraded, 5 newly installed, 0 to remove and 12 not upgraded.
Need to get 21.0MB of archives.
After this operation, 68.4MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com hardy/main emacsen-common 1.4.17 [17.6kB]
<snip> (downloading and installing, completed without error)

greg@foucault:~$sudo apt-get remove emacs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  emacs22-bin-common emacs22-common emacsen-common emacs22-gtk
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  emacs
0 upgraded, 0 newly installed, 1 to remove and 12 not upgraded.
After this operation, 36.9kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 147646 files and directories currently installed.)
Removing emacs ...
greg@foucault:~$sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  emacs22-bin-common emacs22-common emacsen-common emacs22-gtk
The following packages will be REMOVED:
  emacs22-bin-common emacs22-common emacs22-gtk emacsen-common
0 upgraded, 0 newly installed, 4 to remove and 12 not upgraded.
After this operation, 68.3MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 147642 files and directories currently installed.)
Removing emacs22-gtk ...
Cleaning up add-on packages... done.
Removing emacs22-bin-common ...
Removing emacs22-common ...
dpkg - warning: while removing emacs22-common, directory `/var/games' not empty so not removed.
Removing emacsen-common ...
emacsen-common: Handling removal of emacsen flavor emacs

Changed in apt:
status: New → Incomplete
Revision history for this message
Vadim Peretokin (vperetokin) wrote :

No, it's still the same here...

sudo apt-get install emacs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  emacs22-bin-common emacs22-common emacs22-gtk emacsen-common
Suggested packages:
  emacs22-el
The following NEW packages will be installed:
  emacs emacs22-bin-common emacs22-common emacs22-gtk emacsen-common
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/21.0MB of archives.
After this operation, 68.4MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously deselected package emacsen-common.
(Reading database ... 258083 files and directories currently installed.)
Unpacking emacsen-common (from .../emacsen-common_1.4.17_all.deb) ...
Selecting previously deselected package emacs22-common.
Unpacking emacs22-common (from .../emacs22-common_22.1-0ubuntu10.1_all.deb)
...
Selecting previously deselected package emacs22-bin-common.
Unpacking emacs22-bin-common (from
.../emacs22-bin-common_22.1-0ubuntu10.1_amd64.deb) ...
Selecting previously deselected package emacs22-gtk.
Unpacking emacs22-gtk (from .../emacs22-gtk_22.1-0ubuntu10.1_amd64.deb) ...
Selecting previously deselected package emacs.
Unpacking emacs (from .../emacs_22.1-0ubuntu10.1_all.deb) ...
Setting up emacsen-common (1.4.17) ...
emacsen-common: Handling install of emacsen flavor emacs

Setting up emacs22-common (22.1-0ubuntu10.1) ...

Setting up emacs22-bin-common (22.1-0ubuntu10.1) ...

Setting up emacs22-gtk (22.1-0ubuntu10.1) ...
Byte-compiling add-on packages, please wait... done.

Setting up emacs (22.1-0ubuntu10.1) ...
vadi@ubuntu-laptop:~/Desktop$ sudo apt-get remove emacs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  emacs
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 36.9kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 259849 files and directories currently installed.)
Removing emacs ...
vadi@ubuntu-laptop:~/Desktop$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
vadi@ubuntu-laptop:~/Desktop$

Not sure why is it behaving differently for us.

Revision history for this message
era (era) wrote :

On a freshly installed Intrepid box, I get the same behavior: apt-get remove emacs removes only the base emacs package, nothing else.

However, this is what I expect from apt-get; with aptitude, the default is to remove dependent unused packages, whereas with apt-get, it's not (or at least, used to not be, and seems to continue to be that way). Indeed, aptitude remove emacs removes all the packages that apt-get installed.

I would be tempted to mark this bug as "Invalid" (works as designed, although one could argue about whether the design is good), but leave it up to the package owner to decide.

Changed in apt:
status: Incomplete → New
Revision history for this message
era (era) wrote :

Ouch, scratch that, apt-get autoremove removes those remaining packages for me as well. Setting back to Incomplete.

Changed in apt:
status: New → Incomplete
Revision history for this message
Ralph Janke (txwikinger) wrote :

Does this behaviour still occur on jaunty or karmic? Thanks for your help!

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

No, its not an issue in jaunty. installed emacs, it installed some others.
uninstalled it, autoremove removed the others

Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

Marking as Fix Released based on the bug reporter's last comment. Thanks!

Changed in apt (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
harpreet bhatia (bluepicaso) wrote :

Using Meerkat. i Insatalled emacs23 via ubuntu software manager... I uninstalled it. but i found the icon in my application->accessories.. even tried synaptic... but nothing happened... This damn thing does not remove at all

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.