LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-22-2014, 05:41 AM   #1
Haya.m
LQ Newbie
 
Registered: Jun 2014
Posts: 8

Rep: Reputation: Disabled
which files should be deleted to free filesystem root?


Hi all,

I have a problem with low disk space in the filesystem root so I used the commnd
Code:
df -h
    Filesystem                               Size  Used Avail Use% Mounted on
    devtmpfs                                 1.9G     0  1.9G   0% /dev
    tmpfs                                    1.9G  160K  1.9G   1% /dev/shm
    tmpfs                                    1.9G  3.9M  1.9G   1% /run
    tmpfs                                    1.9G     0  1.9G   0% /sys/fs/cgroup
    /dev/mapper/fedora_student--laptop-root   25G   23G  113M 100% /
tmpfs                                    1.9G   80K  1.9G   1% /tmp
    /dev/sda8                                477M  108M  340M  25% /boot
    /dev/sda7                                200M  7.9M  192M   4% /boot/efi
    /dev/mapper/VolGroup00-linux--data       423G  2.0G  400G   1% /transients
But if you see the used space is 23G from 25G so it should be 2G available not 133M, Why this?

And if so, I used the command
Code:
du -h --max-depth=1
to see what's using the most space and I found /usr 3.9G and var/ 6.4G. So to look inside the /var directory to look for the files which take up too much space I used the command
Code:
du -ah /var | sort -n -r | head -n 25
this gave me these four biggest files
992M /var/cache
989M /var/cache/yum/x86_64/18
989M /var/cache/yum/x86_64
989M /var/cache/yum

Which of them can I delete? Are these files important?

Thanks in advance
 
Old 11-22-2014, 06:37 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
In general its a bad idea to delete any file that you didn't create. There are tools for cleaning up built into the system. Start with

yum clean all

Last edited by smallpond; 11-22-2014 at 06:38 AM.
 
Old 11-22-2014, 07:46 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,678

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Quote:
But if you see the used space is 23G from 25G so it should be 2G available not 133M, Why this?
ext2/3/4 file systems reserve 5% for root. This is supposed to decrease fragmentation and allow root to log in in case the file system does become full. You can reduce this amount with tune2fs but zero is not recommended on the /(root) file system
 
1 members found this post helpful.
Old 11-22-2014, 11:06 AM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by Haya.m View Post
I used the command
Code:
du -h --max-depth=1
to see what's using the most space and I found /usr 3.9G and var/ 6.4G. So to look inside the /var directory to look for the files which take up too much space I used the command
Code:
du -ah /var | sort -n -r | head -n 25
this gave me these four biggest files
992M /var/cache
989M /var/cache/yum/x86_64/18
989M /var/cache/yum/x86_64
989M /var/cache/yum

Which of them can I delete? Are these files important?
Is yum configured to save any packages it downloads rather than delete them after installation ("keepcache=1" in /etc/yum.conf)? Unless you have some reason to keep those RPMs around, I would run "yum clean packages" to remove them.
 
Old 11-22-2014, 03:37 PM   #5
Haya.m
LQ Newbie
 
Registered: Jun 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
Is yum configured to save any packages it downloads rather than delete them after installation ("keepcache=1" in /etc/yum.conf)? Unless you have some reason to keep those RPMs around, I would run "yum clean packages" to remove them.
But I have ("keepcache=0" in /etc/yum.conf) so Is it safe to delete them?
 
Old 11-22-2014, 03:39 PM   #6
Haya.m
LQ Newbie
 
Registered: Jun 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
In general its a bad idea to delete any file that you didn't create. There are tools for cleaning up built into the system. Start with

yum clean all

Thanks a lot it frees about 1G.
 
Old 11-22-2014, 03:46 PM   #7
Haya.m
LQ Newbie
 
Registered: Jun 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
ext2/3/4 file systems reserve 5% for root. This is supposed to decrease fragmentation and allow root to log in in case the file system does become full. You can reduce this amount with tune2fs but zero is not recommended on the /(root) file system

I am sorry but I could not understand what you said. Now after running
Code:
yum clean all
it reads only 1.1G and it should be 3G as you see from
Code:
df -h
Filesystem                               Size  Used Avail Use% Mounted on
devtmpfs                                 1.9G     0  1.9G   0% /dev
tmpfs                                    1.9G  100K  1.9G   1% /dev/shm
tmpfs                                    1.9G  3.6M  1.9G   1% /run
tmpfs                                    1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/mapper/fedora_student--laptop-root   25G   22G  1.1G  96% /
tmpfs                                    1.9G   28K  1.9G   1% /tmp
/dev/sda8                                477M  108M  340M  25% /boot
/dev/sda7                                200M  7.9M  192M   4% /boot/efi
/dev/mapper/VolGroup00-linux--data       423G  2.0G  400G   1% /transients
What can I do to see that free space?
 
  


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
Recover deleted files from ext3 filesystem digdogger Linux - Software 15 07-16-2016 08:11 AM
root filesystem reached 93%, need to free the space, help needed..please.. redhat70 Linux - Server 9 10-04-2012 09:53 PM
LXer: Data recovery of deleted files from the FAT filesystem LXer Syndicated Linux News 0 07-09-2010 09:30 AM
Filesystem files getting deleted ShahidKhan Linux - General 6 11-07-2009 09:57 AM
Frontend for recovering deleted files from ext3 filesystem jayakrishnan Linux - General 3 12-16-2004 02:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:35 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
Open Source Consulting | Domain Registration