apt stops working if /var/cache erased

Bug #18391 reported by 66dny9r02
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Invalid
Medium
Matt Zimmerman

Bug Description

Enhancement priority:
According to the Filesystem Hierarchy Standard, files in /var/cache can safely
be deleted without data loss. I suppose this would mean that applications should
be able to handle such a data loss without too much problems.

At this moment, apt stops working if /var/cache/apt is removed. When I made the
/var/cache/apt, /var/cache/archives and /var/cache/archives/partial directories,
it could successfully reload its sources again.

I'd suggest to add a check in apt to see whether its directories in /var/cache
exist and are usable, and if not, to try to make them.

Revision history for this message
Matt Zimmerman (mdz) wrote :

/var/cache/apt is not a file; it's a directory. The FHS makes this distinction
for good reason. You are free to remove files in order to free up space, but
leave the directories and their permissions unchanged.

Revision history for this message
Zahari Zahariev (zahari.zahariev) wrote :

I had the same problem. I used up pretty much of my space and saw that in /var/cache I had like 600MB so I did rm -rf /var/cache/* right after that apt-get and Synaptic returned errors when you would try to use them.

I searched in Google and of course many other folks have had the same issue which is fixed with mkdir -p /var/cache/apt/archives/partial. I do think this is an issue that have happened to many people and will happen in the future and it costs nothing to be fixed and not to couse an error when you have deleted all your /var/chache.

Kind regards!

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.