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

Re: [sheflug] Disk cleanup



steve.tickle [at] softhome.net wrote:
> I'm sorry, I'm going to necessarily be a bit vague here. A box I have access 
> to is running a bit low on disk space. I think part (if not all) of the 
> reason is that I did an apt-get dist-upgrade some time back and it installed 
> X and a load of other stuff I don't need (the box is a web and mailserver 
> located in London) and we don't run X partly because we don't need it and 
> partly because it would just be another potential security hole/something 
> else to to wrong. It may also have been because I installed a package or 
> packages some time back and because of dependencies and dependencies of 
> dependencies all this guff got installed. 
> 
> I wasn't too bothered at the time but now, as I say, diskspace is becoming a 
> bit of an issue. 
> 
> Anyway, to the crux of the matter. Does anyone have any suggestions as to 
> how I can retrieve a bit of diskspace without breaking anything? I could of 
> course uninstall X but I'm fairly sure apt-get would scream at me about 
> dependencies and I'm certainly not familiar enough with the vagaries of 
> Linux to make any informed judgements about what to answer. Equally, I could 
> also just delete some directories but that's also equally ham-fisted. 
> 
> I appreciate that people won't know what apps and services the box is 
> supposed to be running so perhaps there's no real answer to my problem. 
> 
man apt-get on my unstable laptop shows apt-get autoclean and apt-get 
clean will clean up stuff and free off disk space.

"
       clean  clean clears out the local repository of retrieved package 
files. It removes everything but the lock file  from 
/var/cache/apt/archives/ and  /var/cache/apt/archives/partial/.  When 
APT is used as a dselect(8) method, clean is run automatically. Those 
who do not use dselect will likely want to run apt-get clean from time 
to time to free up disk space.

        autoclean
               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.
"

These two really only affect diskspace in /var so it depends how your 
partitions are set if this makes any difference.

I have no idea how you find out what's installed on your system but you 
could do 'apt-get remove x11-common' for starters.  'apt-cache search 
<pkg>' and apt-cache show <pkg> may also give useful info.
> I'd be very interested in what people have to say and enormously grateful 
> for any help though, even so. 
> 
> Regards
HTH
L.

___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.