apt should (optionally) delete cached debs once installed

Bug #90606 reported by RichardNeill
10
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Binary package hint: apt

It would be really useful to have an option to apt to make it never cache packages. I know this can be done manually by running apt-get clean, but
it's a pity that this can't be automated by a setting in the config file. By default, this can waste quite a lot of one's root partition.

This is a particular problem if:

a)The disk is very small. For example, I run ubuntu + KDE + amarok on a 1GB compact flash card, in order to have a totally silent system for music (the oggs are accessed via sshfs).

b)The installer runs out of disk space during the install. This can happen even when installing ubuntu-minimal. I think the installer needs to check for small disks, and run apt-get clean periodically during the install.

Keeping cached copies of debs which are already installed doesn't seem to be a very useful behaviour (unless one has a very slow internet connection, or is installing to multiple machines, or has vast amouts of disk space to waste). Small root partitions are quite common, in several cases:
 * The hardware is old. 6GB disks aren't that uncommon!
 * The hardware is specialised (eg CF card or USB-key)
 * The user is testing, and doesn't want to allocate much space to ubuntu.
 * / is "only" 10GB, and starts filling up rather fast!

My suggestions are:

1)Add an option to apt, specified in apt.conf to always remove debs from the cache once they are installed. (so that the user doesn't have to keep remembering to run apt-get clean)

2)Make the installer aware when it is running out of disk space.

Revision history for this message
Chris Rose (chris-vault5) wrote :

Thank you for your bug report. You might get more traction with suggestion 2 if you file it as a seperate bug under the ubiquity package, which is the Ubuntu installer.

Changed in apt:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Chris Rose (chris-vault5) wrote :

For reference, apt can 'prune' itself regularly, have a look at /etc/cron.daily/apt, the settings for which are in /etc/apt/apt.conf.d/* - specifically 20archive.

Also, if you use synaptic to manage packages it has an option to delete a package after it has been installed.

Revision history for this message
RichardNeill (ubuntu-richardneill) wrote :

Thanks. Will do as suggested, and add (2) to ubiquity.

Also, thanks for your points about synaptic/cron - useful to know, but on a small system, we probably haven't got either of these!

Revision history for this message
Neal McBurnett (nealmcb) wrote : example of how this would help ubiquity

See also this ubiquity bug, which I'm guessing would benefit from this feature:

 https://bugs.launchpad.net/ubuntu/+source/casper/+bug/112516
 More than 2 GB needed for xubuntu install due to lots of updates

Revision history for this message
Anzenketh (anzenketh) wrote :

There still seams to be some talk going on in bug 312491 that has a lot of talk on this issue of apt failing with low disk space.

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 312491, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Please continue to report any other bugs you may find.

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.