Cruft Remover removed most of the installed packages

Bug #290024 reported by Colin Ian King
34
This bug affects 1 person
Affects Status Importance Assigned to Milestone
system-cleaner (Ubuntu)
Fix Released
Critical
Unassigned
Intrepid
Fix Released
Critical
Unassigned

Bug Description

After a clean installation I ran the cruft removal tool (from System->Administration) and a whole load of packages were ticked - I applied this and after 20 minutes saw that the majority of my installed desktop packages were removed. This cleaned up more than left over cruft(!).

ISO test image:

http://cdimage.ubuntu.com/daily-live/20081027/intrepid-desktop-amd64.iso

Test: http://iso.qa.ubuntu.com/qatracker/result/2092/10

SUMMARY FOR SRU: A subset of users can render their systems unusable, by accidentally removing some packages needed for the system to work or, in some cases, all or most packages. This has been handled by checking that two essential packages (dash and gzip) are available in the Packages files, according to apt, and aborting if not. The regression risk for this change is that users might not be able to use the tool at all if the new test is too aggressive, but since update-manager uses the same heuristic, it should work very well.

PATCH: http://bazaar.launchpad.net/~systemcleaner-hackers/systemcleaner/intrepid-sru-1-proposal/changes (revision 108).

TEST CASE: Install without network access ("kvm -net none" suffices). After installation, install system-cleaner, and verify that "sudo system-cleaner find" finds a lot of cruft (at least several tens and possibly hundreds of packages). Install fixed system-cleaner (enabling networking is fine, as long as nothing runs "apt-get update"), and verify that "sudo system-cleaner find" returns nothing.

Revision history for this message
Colin Ian King (colin-king) wrote :
Revision history for this message
Colin Ian King (colin-king) wrote :
Revision history for this message
Colin Ian King (colin-king) wrote :
Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Confirmed. On a fresh kvm install it proposes to install lots of key packages including the kernel.

Revision history for this message
to be removed (liw) wrote :

Instructions to reproduce: install from live CD (did not try alternate, yet) under kvm using the "-net none" option.

This results in the installed system having an apt that considers packages to not be downloadable. This, in turn, makes Cruft Remover consider them to be unavailable, and to consider them to be cruft.

If network is available during installation, everything is OK.

Revision history for this message
Joachim Hansen (sn3ipen) wrote :

This also affected me on a upgrded system from hardy. It removed allot of packages from third party repositories i had installed on my system.

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Joachim, you issue is more likely bug 285746.

Revision history for this message
Steve Langasek (vorlon) wrote :

system-cleaner has been dropped from the desktop task for release after discussion, so this is no longer a critical fix for 8.10 final. Can be considered for SRU instead.

Changed in system-cleaner:
milestone: ubuntu-8.10 → intrepid-updates
Revision history for this message
Dave Vree (hdave) wrote :

I think its a good idea to drop this unless this bug is fixed. I just tried it and it cleans nothing (that I could see) except packages installed from .deb files without the repository. It just deleted skype, picasa, crossover, phun, and google desktop from my machine -- losing all the settings along with it!

Sure I hit the wrong button...its my fault, but it doesn't even prompt you to be sure...and there is no undo.

Revision history for this message
Tux (peter-hoogkamer) wrote :

I installed the RC again and tried to find out why cruft remover list these packages. When opening synaptic I saw a lot of packages listed as "installed localy or obsolete". These were the same as system cleaner listed. So in a way cruft remover did a good thing, because after updating my packages these "installed localy or obsolete" packages were gone and cruft remover did not list them anymore.

I think cruft remover should be more developed to be more sofisticated about what is cruft and what is not. Give some more warning about removing things.

Revision history for this message
Jags Desai (jagsdesai) wrote :

Ubuntu Intrepid 8.10 (installed from i386 Desktop/Live CD) System Cleaner / Cruft Remover removes installed packages :

Ok, I ran Cruft Remover (under System > Administration) on a fresh Intrepid final install, it removed/deleted all the packages that were NOT installed by Synaptic:

1, OpenOffice.org 3.0
2, Solaris Nimbus theme
3, TrueCrypt

And not just "the boxes, that held the installed programs" but they were gone/removed completely from Main Menu, AWN & from Themes (Appearance Preferences) too.

I repeated installations/removals three times and all the time Cruft Remover removed all three installations completely. Cruft Remover screenshot attached.

Martin Pitt (pitti)
Changed in system-cleaner:
assignee: nobody → liw
assignee: nobody → liw
Revision history for this message
Zen Clark (tech-angell) wrote :

What is the best guess as to the eta for a fix? Stuff like this makes it harder to validate upgrading this early into the version's release.

Revision history for this message
to be removed (liw) wrote :

I've uploaded new packages to

http://code.liw.fi/ubuntu/pool/main/s/system-cleaner/

They recognize the case of the missing packages lists, in at least the case I could repeat (installation without network). I would appreciate testing and feedback on whether these packages work for you who have participated in the discussion of this bug.

Changed in system-cleaner:
status: Triaged → In Progress
status: Triaged → In Progress
Revision history for this message
Tux (peter-hoogkamer) wrote :

I will do the following:
1. Install a fresh install of Intrepid
2. Install system-cleaner
3. Check if it lists packages to be removed
4. Download you're updated debs and install them
5. Check system-cleaner again
Results will be here soon

Tux

Revision history for this message
gunnar-eee (gunnar2) wrote :

I came across this also. As a user naively trusting all apps in the Intrepid environment is stuff to trust I launched the System Cleaner directly following an install from Live CD. I assumed it probably cleans away some unneeded files to save some space.
Well as described above most of the components got erased leaving only a command line Linux without the ability to login. So I had to reinstall all over.

I think the System Cleaner should be removed until it is safe for non-experts to run. It can be considered harmful to remove the user's environment without clearly announcing its intention to do so. Not all users may understand what is about to happen when they launch the cleanup.

Revision history for this message
Tux (peter-hoogkamer) wrote :

@Lars
Ok, did my testing and added a step where I installed a third party package (wine). After installing you're updated packages cruft remover showed me the wine package. I noticed you're colomn with the Remove? tekst. That's good. What about adding an "Expert" option to cruft remover? Then you can list old log files and other non system critical cruft within the "normal user mode" and packages like third party software or other system critical packages/files within the Expert mode.

Tux

Revision history for this message
to be removed (liw) wrote :

Tux, thanks for the testing. Looks like the changes fix things sufficiently for an update to intrepid. The other changes you suggest sound like things that could be added for jaunty, thanks for the suggestions.

Revision history for this message
Tux (peter-hoogkamer) wrote :

@Lars
I also tested on Jaunty which has some local or obsolete packages (screenshot) in synaptic. That's where things went wrong in the first place if I recall correctly. These packages are not visible any more with you're updated packages. The attached screenshot shows synaptic with obsolete packages and you're updates Cruft Remover not showing them.

Tux

to be removed (liw)
Changed in system-cleaner:
status: In Progress → Fix Committed
status: In Progress → Fix Committed
to be removed (liw)
description: updated
to be removed (liw)
description: updated
Revision history for this message
Tux (peter-hoogkamer) wrote : Re: [Bug 290024] Re: Cruft Remover removed most of the installed packages

Hello Lars,

I was updating on Jaunty today and found 2 packages in Cruft Remover
which are in "local or obsolete" within Synaptic (doc-base and
libgnomevfs2-common). These packages cannot be removed. On the other
hand are there linux-image packages in "local or obsolete" which are
not listed in cruft remover. I have added a screenshot an will try to
figure out what the difference is between the listed packages.

Tux

2008/11/11 Lars Wirzenius <email address hidden>:
> ** Description changed:
>
> After a clean installation I ran the cruft removal tool (from
> System->Administration) and a whole load of packages were ticked - I
> applied this and after 20 minutes saw that the majority of my installed
> desktop packages were removed. This cleaned up more than left over
> cruft(!).
>
> ISO test image:
>
> http://cdimage.ubuntu.com/daily-live/20081027/intrepid-desktop-amd64.iso
>
> Test: http://iso.qa.ubuntu.com/qatracker/result/2092/10
>
> + SUMMARY FOR SRU: A subset of users can render their systems unusable, by
> + accidentally removing some packages needed for the system to work or, in
> + some cases, all or most packages. This has been handled by checking that
> + two essential packages (dash and gzip) are available in the Packages
> + files, according to apt, and aborting if not. The regression risk for
> + this change is that users might not be able to use the tool at all if
> + the new test is too aggressive, but since update-manager uses the same
> + heuristic, it should work very well.
> +
> + PATCH: http://bazaar.launchpad.net/~systemcleaner-hackers/systemcleaner
> + /intrepid-sru-1-proposal/changes (revision 108).
> +
> TEST CASE: Install without network access ("kvm -net none" suffices).
> After installation, install system-cleaner, and verify that "sudo
> system-cleaner find" finds a lot of cruft (at least several tens and
> possibly hundreds of packages). Install fixed system-cleaner (enabling
> networking is fine, as long as nothing runs "apt-get update"), and
> verify that "sudo system-cleaner find" returns nothing.
>
> --
> Cruft Remover removed most of the installed packages
> https://bugs.launchpad.net/bugs/290024
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Tux (peter-hoogkamer) wrote :

Hello Lars,

I looked at both these packages and they are not in the repository
anymore. Probable a development thing.

2008/11/13 Peter Hoogkamer <email address hidden>:
> Hello Lars,
>
> I was updating on Jaunty today and found 2 packages in Cruft Remover
> which are in "local or obsolete" within Synaptic (doc-base and
> libgnomevfs2-common). These packages cannot be removed. On the other
> hand are there linux-image packages in "local or obsolete" which are
> not listed in cruft remover. I have added a screenshot an will try to
> figure out what the difference is between the listed packages.
>
> Tux
>
> 2008/11/11 Lars Wirzenius <email address hidden>:
>> ** Description changed:
>>
>> After a clean installation I ran the cruft removal tool (from
>> System->Administration) and a whole load of packages were ticked - I
>> applied this and after 20 minutes saw that the majority of my installed
>> desktop packages were removed. This cleaned up more than left over
>> cruft(!).
>>
>> ISO test image:
>>
>> http://cdimage.ubuntu.com/daily-live/20081027/intrepid-desktop-amd64.iso
>>
>> Test: http://iso.qa.ubuntu.com/qatracker/result/2092/10
>>
>> + SUMMARY FOR SRU: A subset of users can render their systems unusable, by
>> + accidentally removing some packages needed for the system to work or, in
>> + some cases, all or most packages. This has been handled by checking that
>> + two essential packages (dash and gzip) are available in the Packages
>> + files, according to apt, and aborting if not. The regression risk for
>> + this change is that users might not be able to use the tool at all if
>> + the new test is too aggressive, but since update-manager uses the same
>> + heuristic, it should work very well.
>> +
>> + PATCH: http://bazaar.launchpad.net/~systemcleaner-hackers/systemcleaner
>> + /intrepid-sru-1-proposal/changes (revision 108).
>> +
>> TEST CASE: Install without network access ("kvm -net none" suffices).
>> After installation, install system-cleaner, and verify that "sudo
>> system-cleaner find" finds a lot of cruft (at least several tens and
>> possibly hundreds of packages). Install fixed system-cleaner (enabling
>> networking is fine, as long as nothing runs "apt-get update"), and
>> verify that "sudo system-cleaner find" returns nothing.
>>
>> --
>> Cruft Remover removed most of the installed packages
>> https://bugs.launchpad.net/bugs/290024
>> You received this bug notification because you are a direct subscriber
>> of the bug.
>>
>

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in system-cleaner:
milestone: intrepid-updates → none
Revision history for this message
Tux (peter-hoogkamer) wrote :

Everytime I check packages on my Intrepid install as well on my Jaunty test install I check if Cruft Remover works. Well it does so far. On Jaunty I have kernel and kernel/system dependent packages in "local or obsolete", but these are not marked by Cruft Remover. A non-system dependent package which is no more needed IS marked by Cruft Remover. So that's ok. But wait .... When removing this package it leaves it's configuration on the system, so there is no complete removal!! Why is that?? Doesn't that leave cruft on my system?

Tux

Revision history for this message
to be removed (liw) wrote :

Tux,

about leaving configuration files when removing packages: I decided that it is not safe to remove the configuration files automatically, since they can contain important data if they have been modified. However, because of time pressure from the intrepid release, I did not want to incorporate a subsystem that lets the user see what has been modified. This will be dealt with in the future, however, since, yes, removed but un-purged packages are cruft.

Revision history for this message
Tux (peter-hoogkamer) wrote :

Ok, thanks for the explanation. I'll continue to test. If I can help
in any way, let me know.

Tux

2008/11/25 Lars Wirzenius <email address hidden>:
> Tux,
>
> about leaving configuration files when removing packages: I decided that
> it is not safe to remove the configuration files automatically, since
> they can contain important data if they have been modified. However,
> because of time pressure from the intrepid release, I did not want to
> incorporate a subsystem that lets the user see what has been modified.
> This will be dealt with in the future, however, since, yes, removed but
> un-purged packages are cruft.
>
> --
> Cruft Remover removed most of the installed packages
> https://bugs.launchpad.net/bugs/290024
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Srikalyan (srikalyan) wrote :

hi,
       I have found the reason why I could not boot after using cruft
remover tool. The reason was this: I have made a custom boot menu and I
always use to keep the same old boot menu whenever a new kernel is being
installed( I am lazy to update my menu.lst as doing it will coz my windows
partition to go away and i have to again change the menu.lst (sorry)) but
when i use cruft it removed old kernel but my old kernel was linked to
menu.lst so I could not boot in. So what I feel a good solution is whenever
cruft is used to remove old kernel it should check whether the menu.lst is
referring the old kernel or not. if it is referring old kernel then it
should inform the user that they should update the menu.lst or can it
automatically update the menu.lst if user enters no then it should not
remove the kernel.

On Tue, Nov 25, 2008 at 7:32 AM, Tux <email address hidden> wrote:

> Ok, thanks for the explanation. I'll continue to test. If I can help
> in any way, let me know.
>
> Tux
>
> 2008/11/25 Lars Wirzenius <email address hidden>:
> > Tux,
> >
> > about leaving configuration files when removing packages: I decided that
> > it is not safe to remove the configuration files automatically, since
> > they can contain important data if they have been modified. However,
> > because of time pressure from the intrepid release, I did not want to
> > incorporate a subsystem that lets the user see what has been modified.
> > This will be dealt with in the future, however, since, yes, removed but
> > un-purged packages are cruft.
> >
> > --
> > Cruft Remover removed most of the installed packages
> > https://bugs.launchpad.net/bugs/290024
> > You received this bug notification because you are a direct subscriber
> > of the bug.
> >
>
> --
> Cruft Remover removed most of the installed packages
> https://bugs.launchpad.net/bugs/290024
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

--
~Srikalyan.

Revision history for this message
to be removed (liw) wrote :

ricky,

Cruft Remover only removes packages, and the packages for the kernel take care of updating the GRUB menu.lst file appropriately.. What Cruft Remover does automatically you could achieve by removing the same packages manually. Thus, if there is a bug, it is in the kernel packages. If you have updated menu.lst in the way it is supposed to be edited, and your Windows entry gets removed anyway, you should file a new bug against the linux-image-2.6 package. This way, it will come to the attention of the people who will be in charge of fixing it. Thanks.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-cleaner - 1.10.4-0ubuntu2

---------------
system-cleaner (1.10.4-0ubuntu2) intrepid-proposed; urgency=low

  * The "viime tingan pakettilisäykset ovat huono idea" release.
  * Added Polish translation from Piotr Makowski. (LP: #290196)
  * The apt Packages list is now checked for sanity. (LP: #290024)
  * Icon is now shown in menu, and by the window manager.
    (LP: #274714)
  * The current kernel will now never be considered cruft.
    (LP: #285657)
  * Now asks user to confirm that they want to remove packages or remove
    other cruft. (LP: #285888)
  * Package short description is now shown in the user interface.
    (LP: #286394)
  * The GTK UI now shows column headers, so that it is clear what the
    tick column means. (No bug reported about this explicitly, but it
    has come up repeatedly.)
  * Support for whitelists in /etc/cruft-remover.d/*.whitelist added.
    See the cruft-remover(8) manual page for details. This can later be
    seeded with the most common third-party packages, until dpkg+apt
    get sufficient meta data to deal with this in a better way.
    (Does not quite close LP: 285746.)

 -- Lars Wirzenius <email address hidden> Fri, 07 Nov 2008 15:58:25 +0200

Changed in system-cleaner:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Copied intrepid-proposed update to jaunty.

Changed in system-cleaner:
status: Fix Committed → Fix Released
tags: added: iso-testing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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