Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

Deleting Files During Program Installation

  Date: Jan 02    Category: Unix / Linux / Ubuntu    Views: 467
  

I have a question regarding program installation files. When one
installs files via "sudo apt-get install" the files get copied to

/var/cache/apt/archives

don't they? If this is the case, would the following command be a good
idea in order to remove the files and reclaim disk space after these
programs have been installed?

sudo rm -f /var/cache/apt/archives/*.deb

What are the pros/cons and caveats of doing this? I want to keep as
much drive space available for useful files as possible.

Share: 

 

3 Answers Found

 
Answer #1    Answered On: Jan 02    

on my system /var/cache/apt/archives contains 568 Meg which is not
significant to me just yet. 22 Gig free

seems odd given that having 500 megs of space total was earth shaking
at one point

 
Answer #2    Answered On: Jan 02    

I use "sudo apt-get autoclean" and "sudo apt-get clean"

See details in Ubuntu help: <https://help.ubuntu.com/community/AptGetHowto>


apt-get autoclean - Run this periodically to clean out .deb archives
from packages which are no longer installed on the system. You can
regain lots of disk space that way. If you're really desperate for
disk space, apt-get clean is more radical, and will remove .deb files
even for packages currently installed. But most of the time you
probably don't need the .debs any more, so it might be worth it if
you're strapped for megabytes.

apt-get clean -- the same as above, except remove *all* packages from
the package cache. Usually you don't need them, so this is smart if
you're running low on disk space. If you're on dial-up, you might
reconsider.

* The package cache is in /var/cache/apt/archives, so "du -sh
/var/cache/apt/archives" will tell you how much space cached packages
are taking up.

 
Answer #3    Answered On: Jan 02    

I remember my wife bought me a 540 MB hard drive and I
thought I'd never fill it up. Now I have a 300GB hard drive that has
approx. 40GB of free space left.

> I use "sudo apt-get autoclean" and "sudo apt-get clean"
>
> See details in Ubuntu help:
https://help.ubuntu.com/community/AptGetHowto
>
> apt-get autoclean - Run this periodically to clean out .deb archives

I will do the autoclean. Thanks for the info.

> * The package cache is in /var/cache/apt/archives, so "du -sh
> /var/cache/apt/archives" will tell you how much space cached
> packages are taking up.

Sweet. I'll definitely check this out. This is on a 20GB hard drive so
space isn't an issue, yet. Just checking for future reference.

 
Didn't find what you were looking for? Find more on Deleting Files During Program Installation Or get search suggestion and latest updates.




Tagged: