0

I had been trying to clear cache in a remote server and I got these commands.

First login as root user and execute:

[root@server ~]# sync
[root@server ~]# echo 3 > /proc/sys/vm/drop_caches
bash: /proc/sys/vm/drop_caches: Permission denied

But I am getting permission denied error.

how to delete the cache? because of this I am not able to install any application.

MadHatter
  • 78,442
  • 20
  • 178
  • 229
Supreeth KV
  • 1
  • 1
  • 4
  • On which of the command are you getting permission denied. In addition, caches should not block you from installing applications. So you probably have another problem preventing you for installing apps. – Huygens Aug 06 '14 at 10:45
  • 3
    I agree, this looks like a classic [XY problem](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem) to me. You've decided the reason you can't install software is because of the caches, and are therefore asking about your problem in clearing caches. But that decision is almost certainly wrong; it would be much better if you rewrote this question to ask about the actual problem you're having (installing software), instead of the problem you're having with your attempted fix (clearing caches). – MadHatter Aug 06 '14 at 11:02

1 Answers1

0

Completely agree with two gentleman,cache will never-ever hurt your performance,in between just want to add I only run this command in our test environment when we are running a buggy code for testing memory leak or in simple word we know what we are doing.

Based on my experience I faced similar issue with OpenVZ which is a OS level virtualization.In case of OS level virtualization you are not getting your own kernel instance and you would share the same page.To drop page cache you need access to physical node but as mentioned earlier its not recommended at all.

Prashant Lakhera
  • 683
  • 1
  • 9
  • 25