[CentOS] how to clear out /var/cache?

Fri Dec 31 13:42:23 UTC 2021
James B Huber <jbhuber at judahnet.net>

On Thu, 2021-12-30 at 16:09 -0800, Skylar Thompson wrote:
> The FHS specification says that applications using /var/cache should
> expect
> those data to disappear anytime, so under a strict interpretation it
> should
> be safe to remove everything. Practically, though, I don't know that
> I'd
> trust every application to adhere to that, so it might be worth
> looking at
> what applications are the biggest users of the directory and making
> targeted deletions or even application-specific tools to remove the
> data
> (i.e. "yum clean all").
> 
> On Thu, Dec 30, 2021 at 06:20:15PM -0500, Fred wrote:
> > Is it safe to just remove files from /var/cache on a running
> > system, or is
> > there a correct procedure for doing that?
> > 
> > Mine has hit over 3 gigs, making it one of the larger directories
> > in /,
> > which is running low on space. I've hit all the low-hanging fruit I
> > can
> > find and now I come to things like /var/cache, and I don't know
> > what to do
> > about such.
> > 
> > Thanks in advance!
> 
> 
> 
It almost always filled up with leftover cruft from yum...
Run "yum clean all" should clear up a large chunk of your space.

Jim
--