nwclear

Clear all networks and variables from memory

Syntax

nwclear

Description

Clears all networks and variables from memory. This is the network extension of clear. One can also just drop some or all networks using nwdrop.

Note that Stata’s own clear (or clear all) does not remove the networks held by nwcommands; only nwclear does (or nwdrop for chosen networks).

This example loads network data and clears everything afterwards.

. nwwebuse glasgow
. nwclear

Alternatively, one can also just drop networks. This does not delete the Stata variables that are not associated with networks. For more information see nwdrop.

. nwdrop _all

Supported network types

Not applicable - clears all networks and Stata variables from memory unconditionally, independent of any network’s own properties.

See also

  • nwdrop, clear
  • last certified : 24 Aug 2026

nwcommands version 3.17.6, 9 November 2026 (check your installed version)


Back to top

nwcommands is free software under the GNU General Public License, version 3, as are the model packages nwsaom, nwergm, nwdynam and nwrem. Citing and licenses · Get help · GitHub. Issues with the core go to the nwcommands repository; issues with a model package go to that package's own repository.

This site uses Just the Docs, a documentation theme for Jekyll.