When you install a package with apt-get or aptitude on a Debian-based system, the downloaded package is, by default, kept in the APT cache located at /var/cache/apt/archives. This is really not necessary as you typically do not re-install the same package ever again. Over time, the content in /var/cache/apt/archives will grow.
If you want to turn off the APT cache, so that downloaded packages are not kept there, you can create the following file in /etc/apt/apt.conf.d.
Dir::Cache ""; Dir::Cache::archives "";
At this point, apt-get or aptitude will no longer store downloaded .deb files in the APT cache.
You can go head and empty the current APT cache.
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!