Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Managing HP-UX Software With SD-UX: HP 9000 Computers > Chapter 6 Removing Software

Removing Installed Software Using the Command Line (swremove)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Just as with other SD-UX commands, to start a remove session via the command line you must assemble options, selections and defaults into a command line or use command options to point to files containing default changes and other variables.

Syntax

The syntax for swremove is:

swremove [XToolkit Option] [-d|-r|-l] [-i] [-p] [-v]
[-C session_file] [-f software_file] [-s source] [-S session_file] [-t target_file] [-x option=value] [-X option_file]
[software_selections] [@ target_selections]

Examples

To remove a software product called MYSOFT from the default depot on the local host, type:

swremove -d MYSOFT

To preview the remove of the C and Pascal products installed at the local host:

swremove -p cc pascal

To remove a particular version of HP Omniback:

swremove Omniback,l/opt/Omniback_v2.0

To remove the entire contents of a local depot:

swremove -d * @ /var/spool/sw

Command Options

The swremove command supports the following standard options:

Option Action

-d

Operates on a depot rather than installed software. “Removing Software from Depots” for more information.

-i

Runs a GUI or TUI interactive session. Used to "pre-specify" software selections for use in the GUI/TUI.

-p

Previews the remove operation without actually removing anything. In the GUI/TUI, this option precludes advancing to the remove phase. You can only go through the Analysis phase.

-r

(Optional) Specifies an alternate root directory. See “Advanced Topics for swremove for more information on removing software from alternate roots.

-v

Turns on verbose output.

-C session_file

Run the command and save the current option and operand values to a file for re-use in another session.

-f software_file

Reads the list of software selections from a file.

-S session_file

Runs swremove based on a previous session.

-t target_file

Reads the list of target hosts from a file. This option applies to the HP OpenView Software Distributor product.

-x option=value

Allows setting of an option on the command line.

-X option_file

Uses the options in the specified options file.

Command Operands

The swremove command supports the standard software selection syntax. For more details on software selection syntax and an example of a software selection file, see “Command Operands ”.

Changing Default Options

In addition to the command-line options listed above, several command behaviors and policy options can be changed by editing default values found in the defaults file:

/var/adm/sw/defaults

or in the user-specific defaults file:

$HOME/.swdefaults.

Values in this file are specified using the command.option=value syntax. See “Advanced Topics for swremove for more information on changing the values in these defaults and extended options.

Table 6-1 Removal Default Options

agent_auto_exit=true

logdetail=false

agent_timeout_minutes=10000

logfile=/var/adm/sw/swremove.log
auto_kernel_build=trueloglevel=1
autoreboot=false

mount_all_filesystems=true

autoremove_job=falsepolling_interval=2

autoselect_dependents=false

remove_empty_depot=true
autoselect_reference_bundles= true

rpc_binding_info=ncacn_ip_tcp:2121 ncadg_ip_udp:[2121]

controller_source=

rpc_timeout=5

distribution_target_directory= /var/spool/swsoftware=
enforce_dependencies=truesoftware_view=products
enforce_scripts=true

targets=

force_single_target=falsetarget_shared_root=
job_title=

verbose=1

log_msgid=0

write_remote_files=false

 

Using Session Files

Each invocation of the swremove command defines a configuration session. The invocation options, source information, software selections, and target hosts for this session are saved before the installation or copy task actually commences. This lets you re-execute the command even if the session ends before proper completion.

Each session configuration is automatically saved to the file $HOME/.sw/sessions/swconfig.last. This file is overwritten at each invocation of swremove.

You can save a session configuration to a specific file by executing swremove with the -C session_file option.

If you do not specify a specific path for the session file, the default location is $HOME/.sw/sessions/.

To re-execute a session file, specify the session file as the argument for the -S session__file option of swremove.

Note that when you re-execute a session file, the values in the session file take precedence over values in the system defaults file. Likewise, any command line options or parameters that you specify when you invoke swconfig take precedence over the values in the session file

Environment Variables

SD programs are affected by external environment variables and environment variables set for use by control scripts. For a description of external environment variables, see Chapter 11, Control Scripts.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.