Space Engineers cleanup frees memory and cuts the block count on your server: install Torch, then type !cleanup delete commands in chat to remove grids by block type, owner or number of blocks.

Old ships, abandoned bases and debris pile up over time and slow your server down. The !cleanup commands come from the Essentials plugin for Torch and remove every grid (ship or station) that matches the conditions you give them.

Before you use Space Engineers cleanup commands

  1. Install Torch from our one click mod section: see How to install Torch and plugins. Add the Essentials plugin there too, as it provides the !cleanup commands.
  2. Make sure you are an admin on your server: see How to become admin on your Space Engineers server.

A cleanup deletes grids for good. Take a backup first (How to back up your game server), so you can restore anything you removed by mistake.

Run the cleanup commands

Run the following commands in chat on your server:

!cleanup delete $

where $ is one of the following variables, then a blocktype and owner or blocks variable:

  • hastype - grids that contain blocks of the given type
  • notype - grids that contain no blocks of the given type
  • hassubtype - grids that contain blocks of the given subtype
  • nosubtype - grids that contain no blocks of the given subtype
  • blockslessthan - grids with less than the given number of blocks
  • blocksgreaterthan - grids with more than the given number of blocks
  • ownedby - grids owned by the given player

Check what a command will hit before you delete anything: run it with !cleanup scan or !cleanup list instead of !cleanup delete, with the same conditions. scan counts the matching grids and list names them. !cleanup help lists every condition the plugin knows.

Cleanup examples

For example:

  • !cleanup delete ownedby GTXGamer - delete any item owned by the player called GTXGamer.
  • !cleanup delete notype - delete any item that has notype. Put a block type after notype to delete grids without that block, as in the beacon example below.
  • !cleanup delete hastype refinery - delete all refineries.
  • !cleanup delete hassubtype largethruster - delete all grids which have a "largethruster" in them.
  • !cleanup delete blockslessthan 1000 - delete any grid which has less than 1000 total blocks.
  • !cleanup delete blocksgreaterthan 100000 - delete any grid which has more than 100000 total blocks.
  • !cleanup delete notype beacon blockslessthan 100 - delete any grid that doesn't have a beacon and has less than 100 blocks.

When you combine conditions, as in the last example, a grid must match all of them to be deleted. That makes notype beacon a good way to keep every build that players marked with a beacon. Grids with a player piloting them are skipped, unless you add the haspilot condition.

Cleanup questions

How do I run a Space Engineers cleanup on my server?

Install Torch and the Essentials plugin, then type !cleanup delete in chat as an admin, followed by one or more conditions such as hastype refinery, ownedby GTXGamer or blockslessthan 100. Run the same conditions with !cleanup scan first to see how many grids will go.

Can I undo a cleanup?

No. Deleted grids are gone from the world. The only way back is to restore a backup you took before the cleanup, which is why you should always back up the server first.

Why does my server use less memory after a cleanup?

Every grid in the world has to be loaded and simulated. Removing old ships, abandoned bases and small debris grids lowers the block count, which frees memory and gives the server less to work through.

Want your own Space Engineers server? See Space Engineers server hosting.

Related guides

If you have any questions or need our help, our support team is available 24/7. Open a support ticket.

Was this answer helpful? 7 Users Found This Useful (11 Votes)