[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: freeing up some space



On Tue 11 Jan 2022 at 14:25:47 (-0500), Cindy Sue Causey wrote:
> On 1/11/22, Roy J. Tellason, Sr. <roy@rtellason.com> wrote:
> > So I'm poking around with mc,  and happened across /var/cache/apt/archives
> > which has a LOT of *.deb files in it, and which seems to include many
> > versions of the same package,  some of them many years old,  going all the
> > way back to 2013.  I guess I've been running debian a little longer than I'd
> > thought...
> >
> > Is it okay to just delete older versions of these files?  Or should I be
> > doing something using one of the package management tools?  I've mostly used
> > synaptic,  but am also aware of apt-get,  apt,  aptitude,  and am not real
> > clear on their comparative capabilities.
> >
> > I'm looking at over 7500 files amounting to over 9.5GB.
> >
> > I also see /var/cache/dictionaries-common,  which appears to be tied to a
> > spelling checker,  which I don't use here.  And /var/cache/samba,  which I
> > also don't use -- there isn't a windoze machine around here at all.
> >
> > What's the best way to get all of this excess stuff out of the system?
> 
> Just chiming in until someone can respond with recent firsthand
> experience. If you go to e.g. "man apt" or "man apt-get", you'll see
> flag options that are about cleaning up downloaded files. I did this
> once a couple years ago and so can't remember which one worked for
> what you're asking, but it does work. Whichever option it is, it
> leaves the currently installed deb in place and cleanses out anything
> that's no longer in use.

No firsthand experience (I run apt-cacher-ng, so I clean the
cache all the time), but I think Cindy Sue is talking about
autoclean:

>From   man apt-get (buster):

  autoclean (and the auto-clean alias since 1.1)
      Like clean, autoclean clears out the local repository of
      retrieved package files. The difference is that it only
      removes package files that can no longer be downloaded, and
      are largely useless. This allows a cache to be maintained
      over a long period without it growing out of control. The
      configuration option APT::Clean-Installed will prevent
      installed packages from being erased if it is set to off.

Cheers,
David.


Reply to: