?
Solved

How to free up space in Solaris 10

Posted on 2009-04-28
9
Medium Priority
?
1,837 Views
Last Modified: 2013-12-27
My disk space has reach 100%. I can't even do pkgrm now... How do I quickly remove unnecessary data/packages to make way for diskspace?
0
Comment
Question by:QLJ
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 40

Accepted Solution

by:
omarfarid earned 400 total points
ID: 24256876
run the following commands as root:

find / -name core -type f -exec rm {} \;

Check under the dir /var/adm for log files like messages

you may also find which big files are on your system by running

du -k / | sort -rn | more

then if you see big files which are not required you may delete them (do not delete directories since they will be big as well)
0
 
LVL 1

Author Comment

by:QLJ
ID: 24257434
One of the folders that came up is in /proc...
any tips on how remove files/directories in this folder?
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 24257466
this is a virtual folder so skip it, any other files?

can you show df -k output
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 48

Expert Comment

by:Tintin
ID: 24257645
You can probably remove everything in /var/tmp and /tmp

Also you may have large log files in /var/log and /var/adm that can be removed.
0
 
LVL 2

Expert Comment

by:nyaar
ID: 24260159
Take a look at /var/crash/<hostname>    
0
 
LVL 1

Author Comment

by:QLJ
ID: 24266158
# df -k
/dev/dsk/c1t0d0s0    9024949 6525917 2408783    74%    /
/devices                   0       0       0     0%    /devices
ctfs                       0       0       0     0%    /system/contract
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
swap                 1921888    1400 1920488     1%    /etc/svc/volatile
objfs                      0       0       0     0%    /system/object
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
                     9024949 6525917 2408783    74%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                     9024949 6525917 2408783    74%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                         0       0       0     0%    /dev/fd
swap                 1920528      40 1920488     1%    /tmp
swap                 1920544      56 1920488     1%    /var/run
0
 
LVL 1

Author Comment

by:QLJ
ID: 24266208
# du -k / | sort -rn | more
9691230
2699079 /usr
2103899 /var
1590814 /proc
:
:
1479765 /opt
1476899 /var/sadm
:
938268  /opt/SUNWspro
863485  /var/sadm/spool
706213  /usr/lib
629677  /opt/SUNWspro/prod
597259  /var/core
574353  /var/sadm/pkg

0
 
LVL 48

Expert Comment

by:Tintin
ID: 24266569
Well, whatever was taking all the space is no longer a problem given that / filesystem is now 74% full.

You could clear out the old core files in /var/core to give back a bit more space.
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 24266709
I do not see any problem from the df -k output you posted. look into these dirs

/var/core
/var/spool

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month15 days, 20 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question