Sponsored Content
Full Discussion: Remove unwanted packages
Operating Systems Solaris Remove unwanted packages Post 302322412 by TonyFullerMalv on Wednesday 3rd of June 2009 04:19:44 PM
Old 06-03-2009
Something like the following might do the trick:

Code:
for PKGSTR in `pkginfo | egrep "gnome|staroffice|jde"; do
  echo PKGSTR = ${PKGSTR}
  PKGNAME=`echo ${PKGSTR} | awk '{ print $1 }'`
  echo PKGNAME = ${PKGNAME}
  pkgrm -n ${PKGNAME}
done

I strongly suggest you run the above with the pkgrm line hashed out or not present and confirm the package list is what you want to remove, I am also doing this from memory as I do not have a Solaris system to hand (must get round to building one at home in VirtualBox at least!), i have assume that the pkginfo output starts with the package's name. pkgrm -n runs it in non-interactive mode, you can create and specify your own admin file to cause pkgrm to remove packages no matter what (break dependencies, etc) non-interactively, you may want to do this as it can be a real pain trying to determine the correct order to remove all the packages for a particular susb-system when you know you simply want to remove all of them! I have also taken a guess with "jde" being mentioned for the Java Desktop Environment so you may need to adjust that, you will need to be careful you do not remove Java (JRE or JDK) itself unless that is to be removed also...

Last edited by TonyFullerMalv; 06-03-2009 at 05:26 PM.. Reason: Added link for Sun Java Desktop Environment, VirtualBox, etc.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove unwanted data?

Hi Can any one help me remove the unwanted data? I would want to remove the complete event id 4910 ( the type there is INFO), that means, I have to remove starting from 7th - 19th lines. can any one of you please help? Thanks, (24 Replies)
Discussion started by: hitmansilentass
24 Replies

2. Shell Programming and Scripting

Remove unwanted XML Tags

I have set of sources and the respective resolution. Please advice how to resolve the same using Unix shell scripting. Source 1: ======= <ext:ContactInfo xmlns:ext="urn:AOL.FLOWS.Extensions"> <ext:InternetEmailAddress>AOL@AOL.COM</ext:InternetEmailAddress> </ext:ContactInfo> Resoultion... (1 Reply)
Discussion started by: ambals123
1 Replies

3. UNIX for Advanced & Expert Users

How to Remove the unwanted Blank Lines

I have a file with the below data, i would like to remove the end blank lines with no data. I used the below commands but could not able to succeed, could you please shed some light. Commands Used: sed '/^$/d' input.txt > output.txt grep -v '^$' input.txt > output.txt input.txt file... (5 Replies)
Discussion started by: Ariean
5 Replies

4. Shell Programming and Scripting

awk - need to remove unwanted newlines on match

Context: I need to remove unwanted newlines from a data file listing books and associated data. Here is a sample listing ( line numbers included ): 1 360762| Skip-beat! 14 /| 9781421517544| nb | 2008.| Nakamura, Yoshiki.| NAKAMUR | Kyoko Mogami followed 2 her true love Sho to Tokyo to... (6 Replies)
Discussion started by: Bubnoff
6 Replies

5. Emergency UNIX and Linux Support

Remove Unwanted Libraries - optimizing

We have a huge makefile composing of inclusion of libraries, objects and system libraries to generate a binary. How do we find out that which of the libraries we can remove in the most efficient way? Doing hit and trial method is a waste of time and can during the linking with some post linking... (12 Replies)
Discussion started by: uunniixx
12 Replies

6. Shell Programming and Scripting

Remove unwanted lines

I have a .xml file, where i need some output. The xml file is like: Code: <?******?></ddddd><sssss>234</dfdffsdf><sdhjh>534</dfdfa>......... /Code I need the output like: code 234 534 . . . /code How can i do it? (5 Replies)
Discussion started by: anupdas
5 Replies

7. Shell Programming and Scripting

remove unwanted text using perl

Hello..I have a text file that need to remove unwanted text. This is the original file. No. Time Source Destination Protocol Info 16 0.649949 10.1.1.101 209.225.11.237 HTTP POST /scripts/cms/xcms.asp HTTP/1.1 ... (9 Replies)
Discussion started by: taxi
9 Replies

8. Shell Programming and Scripting

How to remove unwanted strings?

Hi Guys, Can someone give me a hand on how I can remove unwanted strings like "<Number>" and "</Number>" and retain only the numbers from the input file below. INPUT FILE: <Number>10050000</Number> <Number>1001340001</Number> <Number>1001750002</Number> <Number>100750003</Number>... (8 Replies)
Discussion started by: pinpe
8 Replies

9. Shell Programming and Scripting

How to remove unwanted " from string...

I have this Input File with extra double quotes in the middle. Please suggest how to handle this condition. Input File: "123985","SAW CUT CONCRETE SLAB 20"THICK",,"98.57","","EACH","N" "204312","ARMAFLEX-1 3/8 X 3"",,"2.48","","PER FOOT","N" "205745","MISTING HEAD HOLLOW CONE "C"... (3 Replies)
Discussion started by: BICC
3 Replies

10. Shell Programming and Scripting

Remove unwanted white space

Hi, I have a very big file 25GB with information present in it like $ head ind_stats update index statistics pfirm001.dbo.Office using 200 values go ... (11 Replies)
Discussion started by: sam05121988
11 Replies
clu_is_member(3)					     Library Functions Manual						  clu_is_member(3)

NAME
clu_is_member, clu_is_ready - Determine whether the local system is currently a cluster member or has been configured to be a cluster mem- ber LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <sys/clu.h> boolean_t clu_is_member (); boolean_t clu_is_ready (); DESCRIPTION
The clu_is_member function determines whether the local system is currently a cluster member (that is, the TruCluster Server software has been installed and configured, the system has booted a clusterized kernel, and the connection manager has allowed the system to join the cluster membership). The clu_is_ready function determines whether the local system has been configured to run in a cluster (that is, the TruCluster Server soft- ware has been installed and configured, and the system has booted a clusterized kernel). The clu_is_ready function is most useful to code that runs in the boot path before the connection manager establishes the cluster membership. RETURN VALUES
Upon completion, the clu_is_member function returns TRUE if the local system is currently a cluster member, FALSE otherwise. Upon completion, the clu_is_ready function returns TRUE if the local system has booted from a clusterized kernel, FALSE otherwise. RELATED INFORMATION
Functions: versw(3), clu_get_info(3) Commands: versw(8) delim off clu_is_member(3)
All times are GMT -4. The time now is 11:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy