<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) > [bitburner](./bitburner.md) > [NetscriptPort](./bitburner.netscriptport.md) > [clear](./bitburner.netscriptport.clear.md) ## NetscriptPort.clear() method Empties all data from the port. <b>Signature:</b> ```typescript clear(): void; ``` <b>Returns:</b> void ## Remarks RAM cost: 0 GB