![why](/static/img/x1mno0Ukhc-600.jpeg)
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:
[code]
sync
sudo echo 3 > /proc/sys/vm/drop_caches
[/code]
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.