List of Articles Icon

Knowledge Base

Guides and answers for your VPS, the client area, and billing

Why can't I clear the RAM cache on my VPS?

What this is

You've noticed a lot of memory listed as cache/buffers and want to "free" it. The short answer: you don't need to, and you shouldn't. Linux has decades of refined memory management built in; it uses otherwise-idle RAM to cache frequently accessed files, and it releases that cache automatically and instantly the moment your applications need the memory. It will never let the system run out of memory just to keep things cached.

Why clearing it hurts

The cache is pure upside: reads served from RAM instead of disk make your entire VPS faster. Forcing it empty (the drop_caches trick) doesn't create memory your apps couldn't already claim, it just throws away the speed boost, and Linux has to rebuild the cache from disk afterwards. It solves no real problem and creates a small one.

If a monitoring tool is scaring you by counting cache as "used", read My VPS is using too much memory, the available column in free -h is the number that matters, and our panel Graphs already measure it correctly. Tools that read cgroups counters (docker stats, systemctl status, anything reading memory.current) are the usual scare source: the cgroup charge includes the page cache by design, so their "used" is application memory plus cache lumped together. The long-form explainer: linuxatemyram.com.

Seeing stale content on your website? That's a different cache entirely

If what brought you here is a website showing old content, an edit that won't appear, a stale page, yesterday's prices, the RAM cache is the wrong suspect: Linux's page cache stores file data transparently and can't serve your visitors outdated pages. What does is one of the application-level caches, and the fix is at that layer:

  • The browser: rule it out first with a hard refresh or a private window.
  • Cloudflare or another CDN: if the site is proxied, the edge may be serving a cached copy, purge the URL (or flip on Development Mode while you work). See Cloudflare best practices.
  • Your CMS or app's cache: WordPress caching plugins and framework page caches keep rendered copies, clear the cache from within the app.
  • PHP OPcache: caches compiled PHP code, so an edited .php file can keep running as the old version. Reloading PHP clears it: systemctl reload php8.2-fpm (your version may differ).
  • Redis or Memcached: object caches the application put data in, and the application should be the one to clear (its own cache-flush command or admin button), avoid a blanket FLUSHALL on a Redis instance that might also hold real data, like sessions or queues.

Work from the outside in (browser → CDN → app → OPcache) and the stale layer announces itself. None of these involve drop_caches, and clearing the RAM cache won't refresh a single page.

The one takeaway

If available memory is healthy, there is nothing to clear. If it isn't, clearing cache won't help, find the process eating RAM or upgrade the plan.

Still need help?

You can open a support ticket. So we can help on the first reply, it's worth mentioning:

  • the VPS hostname or IP,
  • the output of free -h,
  • what made you look at memory in the first place (slowness, crashes, a graph).
  • "How do I clear cached memory on my VPS?"
  • "Should I use drop_caches to free RAM?"
  • "Why is so much memory shown as buffers/cache?"
  • "Does clearing the cache speed up my server?"
  • "My website shows old content, do I need to clear the server's cache?"
  • "I edited a PHP file but the site still runs the old version."
Last reviewed: 2026-07-05