Flushing the disk cache

I’ve been looking for this over and over and over, until I had some inspiration today (thanks to Andew and Chris) .. this has one and only one sole purpose: safekeeping, so I don’t end up searching for it all over again …

To free pagecache:

To free dentries and inodes:

To free pagecache, dentries and inodes:

Once that is done, you’ll see the memory (usually RAM) freeing up.