|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Administration: Network Interfaces and Network Virtualization Oracle Solaris 11 Express 11/10|
You can remove all user-defined profiles or a specified user-defined profile from memory and persistent storage by using the nwamcfg destroy -a command.
Note - System-defined profiles, which include the Automatic NCP and the NoNet and Automatic Location profiles, cannot be removed.
The syntax for the destroy command is as follows:
nwamcfg destroy object-type [ class ] object-name
Alternately, you can use the following command:
nwamcfg destroy -a
Example 3-6 Removing a Profile in Command-Line Mode
To remove all of the user-defined profiles on a system, type the following command:
$ nwamcfg destroy -a
Because at least one profile must be active on the system at all times, and to avoid in-use errors when removing user-defined profiles, make sure that you enable the Automatic NCP before using the destroy -a command.
To remove a specific profile on the system, for example the User NCP, type the following command:
$ nwamcfg destroy ncp User
The destroy command can also be used to remove NCUs from an existing NCP. In the following example, an IP NCU with the name net1 is removed from the User NCP.
$ nwamcfg "select ncp User; destroy ncu ip net1"
To confirm that a profile has been removed, use the list subcommand, as shown here:
$ nwamcfg nwamcfg> select ncp User nwamcfg:ncp:User> list NCUs: phys net1 nwamcfg> exit Nothing to commit $
Example 3-7 Interactively Removing a Profile
In the following example, an IP NCU named net2 is removed.
$ nwamcfg list NCPs: Automatic User Locations: Automatic NoNet Legacy test foo $ nwamcfg nwamcfg> select ncp User nwamcfg:ncp:User> list NCUs: phys net2 ip net2 nwamcfg:ncp:User> destroy ncu ip net2 Destroyed ncu 'net2' nwamcfg:ncp:User> list NCUs: phys net2 nwamcfg:ncp:User> end nwamcfg> exit Nothing to commit