Free up memory on Ubuntu

Share this post:

I’ve noticed that doing a extraction of a large archive (with tar) or moving files around the network (with scp) takes up all memory of the Ubuntu server. Just today, I extracted a 33GB archive at the process “eaten” up 28GB of memory, which would be fine if the process would free up the memory after using it. Unfortunately, this is not the case.

So, in order to free up memory again one has to issue the following command:

sudo echo 3 > /proc/sys/vm/drop_caches

The “echo 3 > /proc/sys/vm/drop_caches” command is used to clean up your memory from pagecache, dentries and inodes.

This effectively frees up the used memory.

Over 10 years in business.

Self-funded. No investors. No bullshit.

More than 3,000 customers worldwide.

Helpmonks - no bullshit customer engagement service

Growth starts with action

Empower your team and delight your customers.

Helpmonks - email management for small businesses