LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   clean up free some disk space (https://www.linuxquestions.org/questions/linux-newbie-8/clean-up-free-some-disk-space-929123/)

fachhoch@gmail.com 02-13-2012 10:46 AM

clean up free some disk space
 
my diskspace in linux is all occupied , no more free disk space, I want to free some disk space but I dont know what is safe to delete , I dont know what folders are dedicated to linux os , I know I folder I use , but others I want to delete , deleting these folder should not impact linux os .
please advice me
here is the folder by size



[root@ACFAS12 /]# du -sh * |sort
0 misc
0 net
0 proc
0 sys
11G pkg
12K u02
1.3G root
141M etc
16K lost+found
16M boot
199M lib
21M lib64
2.5G usr
31M sbin
3.2G opt
4.0K media
4.0K selinux
4.0K srv
4.0K svn_backup
4.1G var
520K tmp
7.6G home
7.6M bin
77M u01
8.0K mnt
88K dev

can I delete the Pkg folder ? is this linux specific or user created ?

Soadyheid 02-13-2012 10:57 AM

What distribution are you running? Do you want to remove data (pictures/documents/music, etc) or Linux applications? You can't just delete a directory in Linux or you're asking for trouble.
If you can clear out data, it should be in your /home directory. If you want to remove applications I'd use whatever package manager your distribution uses; yast for SUSE, Synaptics for Debian based Distros, eg, Ubuntu. This would allow you to remove the software cleanly. You can also tidy up by removing browser histoey files and cookies (not a lot of space freed off really)

Play Bonny! :hattip:

fachhoch@gmail.com 02-13-2012 11:21 AM

I am using CentOS release 5.3 (Final)

please advice me what cleaning tool should I use ?

qrange 02-13-2012 02:11 PM

CentOS uses 'Yellow dog Updater, Modified (Yum)' as package manager. you should try uninstalling something with it. usually, on every modern OS you use same program for installing and uninstalling software.
There is also an option to use filesystem that can compress /usr and similar, but that sounds complex to me (never used it).

snowday 02-13-2012 02:17 PM

A $99 replacement hard drive would solve your problem (and give you lots of room to grow).

You can free up a gigabyte here and there by clearing log files, package caches, etc.; but it will not solve the underlying problem: your drive will eventually fill back up again, and searching for files to safely delete will become a weekly/monthly frustration. :(

chrism01 02-13-2012 08:09 PM

You might want to tune up logrotate, which should be purging your logfiles under /var.
You may be retaining more files than you want.

Check carefully what yum says it is going to delete before confirming or you may break your system.

As snowpine said though, disks these days are very cheap; I think the default is prob 500GB, maybe 1TB by now.

PS: that pkg dir is non-std; can you do an ls in there.
Did you setup this system yourself?
Does it normally have internet access?
It's possible that whoever set it up copied the pkgs from the install media onto the HDD.
If you do have internet access normally, then that would be redundant.
HTH


All times are GMT -5. The time now is 03:40 AM.