You are not logged in.

#1 2006-02-05 18:39:06

Bysshe
Member
Registered: 2004-12-10
Posts: 271

Filesystem cleanup

I'm kinda confused considering I barely have anything installed on the system, yet it takes up 5.1gb of space.   I'm using fluxbox.  This install is probably about a year old.  Removing kernel logs and pacman cache have yielded no improvement.

So, what have any of you fellas noticed tends to ruin drive space?

Offline

#2 2006-02-05 18:58:32

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: Filesystem cleanup

That's quite much for a basic arch system.  Does that include your HOME dir?
How much space takes each directory on your filesystem?
The way to go is probably first to track down in what directory the harddisc space is

Offline

#3 2006-02-05 19:06:11

thomas23
Member
From: Canada, Montreal
Registered: 2005-06-11
Posts: 40

Re: Filesystem cleanup

First :

pacman -Scc

to clean the pacman cache. It keeps old packages as well as new ones. No need to say (but I'm saying it anyway) that your pacman's cache can become large over a year if you did frequent updates.

Second : take a look at your root's home directory. If found a weird useless file named "u" that was only getting bigger and bigger (5 gb at maximum size). I just deleted it and it was fine after... god knows what it was really ! :?

Third :

pacman -Q

then take a good look at the installed package list and

pacman -Rs useless_packages

.

Fourth : Take a look at the size of your home directory. If it is really big, take at look at every user's directory. Don't forget that some hidden directories can became quite big. Like /home/you/.wine ! Wich can literally become a second operating system in some cases...

These are the steps I use every time I clean up my system. Except for the second one that was just weird...

Offline

#4 2006-02-05 20:04:06

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: Filesystem cleanup

pacman -Scc doesn't remove the packages in /var/cache/pacman/src, only those in /var/cache/pacman/pkg so it's worth deleting those too:

rm /var/cache/pacman/src/*

If you've installed a lot through ABS, there will be many instances of packages and their source on your system, which you don't need, iirc:
1) the compressed source downloaded to compile the package
2) the source
3) the package installed in a prefix
4) the pacman package where you compiled it
5) the pacman package in the pacman cache (the first one I mentioned at the top how to get rid of)
6) the package installed in the real root

so, to do it:

rm -rf /var/abs
mkdir /var/abs
abs

Note that all PKGBUILDS and packages stored there will be gone, if you have some PKGBUILDS to backup, do it before the mentioned steps!

After doing the steps myself not long ago, I managed to regain almost 1.8GB of storage.

Offline

#5 2006-02-05 23:52:34

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Filesystem cleanup

for the record, pacman -Sc will delete old packages from its cache directory and pacman -Scc will delete ALL packages from cache. I would suggest doing -Sc first and see how much space you have left. Its always a good idea to keep at least one older package ready in cache in case you need to downgrade something.

Offline

#6 2006-02-06 03:28:52

Bysshe
Member
Registered: 2004-12-10
Posts: 271

Re: Filesystem cleanup

Well, I use the df command (specifically, $df -h) to look at drive space, which doesn't seem to work for looking at individual directories.  I did look at the help file for the command, and doesn't look good for that.

But I do use the program "worker" for simplifying certain tasks occasionally, and it reports the /home directory as 1413mb.  LOL.  Seems a little big, so I guess I might prune it. 

I also like to use one of the GUI package managers to walk through installed programs, which I've already done recently.

I did get it down to 3.9gb so far.  I guess it's close to normal, but still  2.5 gigs with hypothetically nothing in the home directory seems I'm missing something.  I have a Microsoft Windows install that is about three years old , heavily populated, and my C: partition is 4gigs, though I admit to installing most programs to a seperate partition.  That is still odd.

Guess I've just got to go through each directory and try to figure out what the big holdup is.  There's really barely anything installed on this arch system. 

Thanks for the help so far, BTW.

Offline

#7 2006-02-06 04:17:36

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Filesystem cleanup

$ du -s *

will give you the disk usage of everything in the current directory.

Offline

#8 2006-02-06 04:35:37

Bysshe
Member
Registered: 2004-12-10
Posts: 271

Re: Filesystem cleanup

Cerebral wrote:
$ du -s *

will give you the disk usage of everything in the current directory.

Tttthank-you.  big_smile 

du -sh /home
1.5G

8)

Offline

#9 2006-02-06 08:11:10

mpie
Member
From: 404 Not found
Registered: 2005-03-06
Posts: 649

Re: Filesystem cleanup

I have had a simular experience may be worth checking home/.local/Trash/files

I got stuck in a loop before where files were being backed up to there after being emptied from trash

Offline

#10 2006-02-06 08:46:07

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: Filesystem cleanup

I once had a 1GB cache file of mplayer in my home dir. Also uncompleted torrent files may be quite large as they reserve harddisc space. Might be worth checking too

Offline

#11 2006-02-06 19:39:22

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Filesystem cleanup

You could also check out filelight (BTW, it's a KDE app).  It uses pie charts to show the space taken by files/directories. It might help you to find out what directories takes the most HD space.

Offline

#12 2006-02-06 21:03:58

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: Filesystem cleanup

When I'm cleaning up my hard drive, df and du are very handy. However, the intuitive interface of xdiskusage is extremely helpful as well. It's like a frontend for df and du, and lets you see how big a directory is, as well as its subdirectories, in a visual way.

I found some screenshots. You can find this great package in pacman, of course.

By the way, you should run it as root, because your user may not have permission to view some directories.

Offline

#13 2006-02-07 10:15:08

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Filesystem cleanup

Do you have crond running? If not, remember to logrotate regularly.

Offline

Board footer

Powered by FluxBB