Operating System - HP-UX
1819931 Members
3078 Online
109607 Solutions
New Discussion юеВ

What can I delete from /opt

 
Nial Gunn
Frequent Advisor

What can I delete from /opt

Hi, I need to delete some data from /opt, as it is full and I need some space. I have attached a txt doc showing the contents of /opt can anyone advise me on what to delete?
10 REPLIES 10
Raj D.
Honored Contributor

Re: What can I delete from /opt

Hi Nial ,

You can not delete any files from opt as the system packages resides there.
Though you can check for any user files if occupying there :

# cd /opt
# ls -lR | sort +4 -5nr | more

And you may remove any unwanted package , with swremove to get some free space.

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
DCE
Honored Contributor

Re: What can I delete from /opt

It depends on what you do not need - If you do not need graphics, for example, you swremove them - but you need to know if this will affect any apps. The /opt directory is very hard to reduce.

Personally I would either extend /opt, or if that is not possible, I would create a new mount point in a different VG for /opt/OV and move all that data over.

There are several other directories that are non-system directories you could make their own mount points as well

Alessandro Pilati
Esteemed Contributor

Re: What can I delete from /opt

In the case of /opt, search also for unnecessary .tar and .gz files:

find . -name *.gz|xargs du -k|sort -rn +0
find . -name *.tar|xargs du -k|sort -rn +0

but unless you remove software, it's quite difficult to free space in /opt, it's not /var...
Another solution is to "transfer" Ignite in another Filesystem and then make a link in /opt that refers to the new location.

So if the hints of RAJ and these are not enough, I can address you to enlarge the filesystem...

If you have OnlineJFS, you can do it at system running.
Otherwise, enter in single user mode:

Shutdown the system,
get into single user mode (hpux -is /stand/vmunix).
Then do:
mount /usr
mount /var
mount /tmp
lvextend -L new_size_in_mb /dev/vg00/lvol_of_opt
extendfs /dev/vg00/rlvol_of_opt
init 3


Hope this helps

Regards,
Alex
if you don't try, you'll never know if you are able to
A. Clay Stephenson
Acclaimed Contributor

Re: What can I delete from /opt

Essentially the answer is nothing unless you use swremove to remove some inessential packages. You could probably remove the older versions of Java. One approach would be to copy everything in /opt to another filesystem. /opt does not have to be in vg00 so it could be moved to another VG. To doi that, you would create a new, larger LVOL and filesystem and use cpio to copy everything to /newopt. You then umount /newopt and edit /etc/fstab to change /opt's mountpoint. Reboot and you are good to go. You can then free the space used by the original /opt and delete that LVOL.
If it ain't broke, I can fix that.
Geoff Wild
Honored Contributor

Re: What can I delete from /opt

Swremove, or better yet, just extend the size of it.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Pete Randall
Outstanding Contributor

Re: What can I delete from /opt

I seem to remember a facility to remove unused filesets/software, possibly in SAM??? I can't seem to find it on any of my 11i boxes. I wonder if it was an 11.0 feature. Anybody remember such a thing? Or is it my feeble memory playing tricks on me again?


Pete

Pete
Torsten.
Acclaimed Contributor

Re: What can I delete from /opt

@Pete,

I don't know such feature, but perhaps you have the "cleanup" in mind for removing old copies of replaced patches.

Regards
Torsten

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Pete Randall
Outstanding Contributor

Re: What can I delete from /opt

Thanks, Torsten, but my feeble memory recalls the cleanup command. This was something different. Maybe it was 10.20 . . . . .


Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: What can I delete from /opt

The cleanup command (which is available in 11.x although 11.0 requires a patch to get the command) will not free space in /opt but rather in /var.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: What can I delete from /opt

Hi Pete:

I believe the command you are remembering was 'freedisk'. Rather dangerous and deprecated. You can read more in the 10x manpages.

Regards!

...JRF...