|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Administration: Network Interfaces and Network Virtualization Oracle Solaris 11 Information Library|
You can remove all user-defined profiles or a specified user-defined profile from memory and persistent storage by using the netcfg 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:
netcfg destroy object-type [ class ] object-name
Alternatively, you can use the following command to remove all of the user-defined profiles in a system:
netcfg destroy -a
Example 4-6 Removing All User-Defined Profiles by Using netcfg Command-Line Mode
To remove all of the user-defined profiles on a system, type the following command:
$ netcfg 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.
Example 4-7 Removing a Specific User-Defined Profile by Using netcfg Command-Line Mode
To remove a specific user-defined profile on the system, for example the NCP named User, type the following command:
$ netcfg destroy ncp User
The destroy command can also be used to remove NCUs from an existing NCP. In the following example, an interface NCU with the name net1 is removed from the user-defined NCP:
$ netcfg "select ncp User; destroy ncu ip net1"
To confirm that a profile has been removed, use the list subcommand, as shown here:
$ netcfg netcfg> select ncp User netcfg:ncp:User> list NCUs: phys net1 netcfg> exit Nothing to commit $
Example 4-8 Interactively Removing a Profile
In the following example, an IP NCU named net2 is removed.
$ netcfg list NCPs: Automatic User Locations: Automatic NoNet test foo $ netcfg netcfg> select ncp User netcfg:ncp:User> list NCUs: phys net2 ip net2 netcfg:ncp:User> destroy ncu ip net2 Destroyed ncu 'net2' netcfg:ncp:User> list NCUs: phys net2 netcfg:ncp:User> end netcfg> exit Nothing to commit $