Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

One of my machines is the 2GB EeePC Surf, a neat netbook with very limited resources. So limited that right now, I have 22MB free space left.

On it, I'm running Arch Linux with the Openbox DE and a host of needed applications for it to function as a mobile PC.

What methods are available to stamp out some unnecessary used space?

share|improve this question
    
@Stefan how much RAM does it have? (just wondering if it's feasible to put things like /tmp in ram) –  xenoterracide Sep 14 '10 at 21:24
1  
@Stefan also... if you're willing to go the experimental route... btrfs supposedly supports a compressed file system (or is going to?) maybe check that out –  xenoterracide Sep 14 '10 at 21:31
    
@stefan also du -sh / to see where most of your space is being used. –  xenoterracide Sep 14 '10 at 21:33
    
@xeno, 490MB RAM, and it's du -sh /*? –  Stefan Sep 14 '10 at 22:32
    
@Stefan so it is... oops... of you can cd / and run du -sh * and drill down... (you don't really have enough ram to store stuff in it) –  xenoterracide Sep 15 '10 at 3:13

3 Answers 3

up vote 14 down vote accepted

Here are some points you could start with:

  • Have a look at the packages installed on your system with pacman -Q and remove the ones you don't need. A good start may be to append the -t switch:

    Restrict or filter output to packages not required by any currently installed package.

  • Clean the package cache of pacman with pacman -Sc

  • Always use pacman -Rs to remove also unused package dependencies.

  • To find "big files" and folders which use large parts of the disk, a nice addition to du is xdiskusage. This little tool lets you quickly browse your filesystem and see graphical representation of the disk usage of the folders.

share|improve this answer
    
pacman -cc to clean the entire cache including installed packages I think. Not normally recommended as you may want those as backups later. –  xenoterracide Sep 14 '10 at 21:22
    
@xeno, I already mount a diretory on my desktop for --cachedir, so I don't need to keep any pkg files. –  Stefan Sep 14 '10 at 22:35
1  
For clearing space on /, I found pacgraph really useful. It can sort your installed packages by size, so you can better prioritise what it makes sense to remove. (It can even draw SVG dependency graphs, but is useful from just the command line.) –  Anko Jan 14 at 10:34

I would suggest AUTOMATING looking at your own very old files and see if its necessary and remove them. This can done with two things. One writing a find command to look for very old files. and using this output (maybe pipe) to lograte script to archive files older than says 3 months and delete files older than 3 months in archive and send a mail to 1 day before deleting it. So that you can be sure you have not lost any important file. So in finally you would need the following commands to accomplish the above:

find , | , logrotate , mail, crontab

I am not going to spoon feed you. I have done this before has been quite successful with this and was later scrapped because we decided to go with nagios for monitoring as it was more tuned to do that kind of stuff in a corp server. I think if mail command is not already configured for you, you might find that the toughest rest should be straight forward. This all needs to done through bash scripting and putting that in cron job and to run every x days. Learn bash scripting, it will be very useful not only for this but to make your life easier with *nix. So use your favourite internet search engine and read about the above commands and bash scripting. And tie them together and test it. Once satisfied put to regular use. I assure it will be fun doing this. You will learn a lot if you haven't done this kinda before.

  • Hope that helps
share|improve this answer
1  
Fro my experience i found that most disk occupying things are not OS related files but my own files accumulated over a period of time , hence i suggested the above. –  Naai Sekar Jul 9 '11 at 10:33

On the 4GB disk in my Eeepc with Ubuntu it helped to remove some locale files (from /usr/share/locale) and Gnome help files (from /usr/share/gnome/help/). Both were installed for languages which I don't use. Not sure if Arch Linux even installs all those files, though.

share|improve this answer
    
yes... du -hs /usr/share/locale is about 300MB... can I just rm -rf the unneeded files? –  Stefan Sep 15 '10 at 15:45
2  
@Stefan wiki.archlinux.org/index.php/Locale If you edit /etc/locale.gen and re-run locale-gen, you should have fewer pre-compiled locales. If you want to free up more space in an automated way, you might want to try aur.archlinux.org/packages.php?ID=11975 too. (But it's unsupported and if it breaks your system, you get to keep the pieces.) –  ephemient Sep 16 '10 at 2:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.