> For the complete documentation index, see [llms.txt](https://til.yulrizka.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.yulrizka.com/linux/clearing-up-swap-space.md).

# clearing up swap space

*WARNING: make sure the memory is enough to put the data back from swap, else system will start killing processes*

To clear up swap space (put the data back into memory) we can do

```
# swapoff -a && swapon -a
```

Because this is quite slow process, it's a good idea to run this inside screen session.
