LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-22-2009, 04:25 PM   #1
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Rep: Reputation: 15
cleaning hdd


Hi,

If my space on my filesystem is closing in, how would I clean up some space? I don't know where to start, I don't want to delete important system files or anything.

Thanks,
Chris
 
Old 09-22-2009, 04:34 PM   #2
btncix
Member
 
Registered: Aug 2009
Location: USA
Posts: 141

Rep: Reputation: 26
what system are you running?
 
Old 09-22-2009, 04:35 PM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,615
Blog Entries: 26

Rep: Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987
Hi,

Quote:
Originally Posted by chris24300 View Post
Hi,

If my space on my filesystem is closing in, how would I clean up some space? I don't know where to start, I don't want to delete important system files or anything.

Thanks,
Chris
Delete files within your '/home/chris' (assume chris is the user) that you don't need any longer. These could be files that you created from downloads or whatever. As long as the files are in your user space that were created by you then there won't be a problem. You could move the files to another media.

'Linux Newbie Administrator Guide' would be useful.

This link and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
Old 09-22-2009, 04:42 PM   #4
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Original Poster
Rep: Reputation: 15
I'm running CentOS.

Thanks onebuck
 
Old 09-22-2009, 04:45 PM   #5
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Original Poster
Rep: Reputation: 15
I just went to clean out my directories but when I opened a folder under /home the label at the bottom of the window browser says Free space: 91 GB... I figured I might have used up a lot of space because I was installing a large amount of packages to cover all possible needs. Could I have set a restriction under the / directory by accident? That says its free space is 2.5 MB

If I navigate to /usr or /var they also say free space is 2.5 MB.

Thanks,
Chris

Last edited by chris24300; 09-22-2009 at 04:48 PM.
 
Old 09-22-2009, 04:58 PM   #6
btncix
Member
 
Registered: Aug 2009
Location: USA
Posts: 141

Rep: Reputation: 26
Check your partitions and disk usage. You can use fdisk, cfdisk, and df to do that.
 
Old 09-22-2009, 05:23 PM   #7
silencestone
Member
 
Registered: Mar 2006
Location: USA
Distribution: [Current: Ubuntu, Arch] | {Past: Vector, Deli, Mint, Wolvix, OpenSUSE, Slackware, Puppy}
Posts: 70

Rep: Reputation: 15
df -h on the command-line will show how the root filesystem is mounted on your partitions and how much free space/total space per partition (mount, really). Once you know that, you can cd into each folder and run du -sh, which shows disk usage for each folder and file in your current folder.

There are some GUI programs that'll neatly display pie charts and graphs of disk usage; check your package manager for what's available for your distro.
 
Old 09-25-2009, 07:53 AM   #8
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Original Poster
Rep: Reputation: 15
OK here was my output. I am trying to install an application and since it will have a CLI I need the / (md0) to be free don't I? /home has plenty of room but if I install it under a directory there will the program still work through the terminal? Do I have to include it into the PATH? (not sure how to do that)
Code:
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md0              7.6G  7.2G     0 100% /
/dev/md3              7.6G  227M  7.0G   4% /tmp
/dev/md1              110G   13G   92G  13% /home
tmpfs                1013M     0 1013M   0% /dev/shm
 
Old 09-25-2009, 07:59 AM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,294

Rep: Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358
You can put the program under /home if it will allow you. If you you are compiling the src there's usually a --prefix-dir or similar option.
That said, the root file system (/) is full. I'd check the /var especially /var/log dir(s) under '/'.
Try a

du -h / |sort -n -k1

http://linux.die.net/man/1/du
 
Old 09-29-2009, 12:01 PM   #10
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Original Poster
Rep: Reputation: 15
I need to install my application under /opt so it says I have no free space... Can I remove space from my /dev/md1 partition and add it to /dev/md0?

Thanks,
Chris
 
Old 09-29-2009, 03:02 PM   #11
AngTheo789
Member
 
Registered: Sep 2009
Posts: 110

Rep: Reputation: 24
Based on your df output you have a very small partition set aside for the / (root) partition. This gets crowded by having installed a lot of packages, most of which is usually going into /usr, and also log files and other stuff in /var. Your /home partition has a lot of space, so as a quick hack you can:
1. copy the WHOLE /usr directory to /home (cp -dpR /usr /home/usr),
2. then rename the original /usr directory to /usr.old,
3. create a softlink to the copied directory (ln -s /home/usr /usr)
4. if everthing runs fine, then remove the old directory (rm -rf /usr.old)

Maybe do the same for /var, but usually it's /usr that takes more disk space, so this won't be necessary, I guess.
Obviously the best solution would be to repartition the system either by having a larger / partition or putting /usr on it's own partition - but that is a lot more work.

Last edited by AngTheo789; 09-29-2009 at 03:03 PM. Reason: typo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copied Debian install from dead hdd to new hdd.now system fails to boot :S deepclutch Debian 18 02-15-2008 07:17 AM
Cleaning up the clutter Fasn8n Ubuntu 10 03-01-2006 01:45 PM
Cleaning up an old PC Merlyn Linux - Hardware 8 10-25-2005 06:33 AM
How to format & mount 2nd hdd after FedCor1 has been installed on 1st hdd? clay394 Fedora 1 05-18-2004 01:50 PM
cleaning up? phonecian Linux - Software 1 10-19-2003 06:27 AM


All times are GMT -5. The time now is 09:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration