Cannot delete var/cache folder magento 2
Hi for some reason I cannot delete the var/cache folder. Because of it I cannot switch between production > developer mode.
When I do get the following:
"The directory "fullurl/var/cache/" cannot be deleted Warning!rmdir(fullurl/var/cache/): Device or resource busy
I tried commands:
umount /var/cache > not permitted
rm -rf var/cache/ > Device or Resource busy.
magento2 cache
add a comment |
Hi for some reason I cannot delete the var/cache folder. Because of it I cannot switch between production > developer mode.
When I do get the following:
"The directory "fullurl/var/cache/" cannot be deleted Warning!rmdir(fullurl/var/cache/): Device or resource busy
I tried commands:
umount /var/cache > not permitted
rm -rf var/cache/ > Device or Resource busy.
magento2 cache
Does your user have access to said folder?
– Julien Lachal
Dec 27 '16 at 15:53
This is more of server issue than a Magento one, you likely have a process using the directory. Have you tried tolsof +D var/cache
to find out what process this might be?
– Jonathan Wommack
Dec 27 '16 at 19:11
add a comment |
Hi for some reason I cannot delete the var/cache folder. Because of it I cannot switch between production > developer mode.
When I do get the following:
"The directory "fullurl/var/cache/" cannot be deleted Warning!rmdir(fullurl/var/cache/): Device or resource busy
I tried commands:
umount /var/cache > not permitted
rm -rf var/cache/ > Device or Resource busy.
magento2 cache
Hi for some reason I cannot delete the var/cache folder. Because of it I cannot switch between production > developer mode.
When I do get the following:
"The directory "fullurl/var/cache/" cannot be deleted Warning!rmdir(fullurl/var/cache/): Device or resource busy
I tried commands:
umount /var/cache > not permitted
rm -rf var/cache/ > Device or Resource busy.
magento2 cache
magento2 cache
edited Dec 28 '16 at 5:39
Manashvi Birla
6,15241840
6,15241840
asked Dec 27 '16 at 15:51
KristianKristian
63
63
Does your user have access to said folder?
– Julien Lachal
Dec 27 '16 at 15:53
This is more of server issue than a Magento one, you likely have a process using the directory. Have you tried tolsof +D var/cache
to find out what process this might be?
– Jonathan Wommack
Dec 27 '16 at 19:11
add a comment |
Does your user have access to said folder?
– Julien Lachal
Dec 27 '16 at 15:53
This is more of server issue than a Magento one, you likely have a process using the directory. Have you tried tolsof +D var/cache
to find out what process this might be?
– Jonathan Wommack
Dec 27 '16 at 19:11
Does your user have access to said folder?
– Julien Lachal
Dec 27 '16 at 15:53
Does your user have access to said folder?
– Julien Lachal
Dec 27 '16 at 15:53
This is more of server issue than a Magento one, you likely have a process using the directory. Have you tried to
lsof +D var/cache
to find out what process this might be?– Jonathan Wommack
Dec 27 '16 at 19:11
This is more of server issue than a Magento one, you likely have a process using the directory. Have you tried to
lsof +D var/cache
to find out what process this might be?– Jonathan Wommack
Dec 27 '16 at 19:11
add a comment |
3 Answers
3
active
oldest
votes
Try above steps,
Step 1. Give "read-write(recursive)" permission specially to var folder.
Step 2. See that files in /var/report
folder are readable
Step 3. Then apply "Delete" on the cache folder
add a comment |
This is probably the cache folder being mounted in tmpfs - which is one of the recommended speed boosts for magento - you had it right to umount it - but you need to find it first, issue:
df -h
Sample cropped output:
none 2.0G 0 2.0G 0% /home/magentolive/public_html/var/cache
then copy/paste the cache path for umount something like this:
# umount /home/magento/public_html/var/cache
most likely as root - may need to contact you sysadmin and explain.
The script should run -- ah but it's not over!
need to
mkdir -p /home/magento/public_html/var/cache
otherwise it isn't there to delete. what a cruddy script. just delete the contents of the folder!
add a comment |
Run below command to remove the var/cache folder:
rm -rf ./var/cache/*
Also use this command to remove the pub static.
rm -rf ./pub/static/*
After run upgrade and deployment command to re-generate that folders.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f152058%2fcannot-delete-var-cache-folder-magento-2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try above steps,
Step 1. Give "read-write(recursive)" permission specially to var folder.
Step 2. See that files in /var/report
folder are readable
Step 3. Then apply "Delete" on the cache folder
add a comment |
Try above steps,
Step 1. Give "read-write(recursive)" permission specially to var folder.
Step 2. See that files in /var/report
folder are readable
Step 3. Then apply "Delete" on the cache folder
add a comment |
Try above steps,
Step 1. Give "read-write(recursive)" permission specially to var folder.
Step 2. See that files in /var/report
folder are readable
Step 3. Then apply "Delete" on the cache folder
Try above steps,
Step 1. Give "read-write(recursive)" permission specially to var folder.
Step 2. See that files in /var/report
folder are readable
Step 3. Then apply "Delete" on the cache folder
edited Dec 28 '16 at 5:38
Manashvi Birla
6,15241840
6,15241840
answered Dec 28 '16 at 4:26
Disha SinghDisha Singh
7551034
7551034
add a comment |
add a comment |
This is probably the cache folder being mounted in tmpfs - which is one of the recommended speed boosts for magento - you had it right to umount it - but you need to find it first, issue:
df -h
Sample cropped output:
none 2.0G 0 2.0G 0% /home/magentolive/public_html/var/cache
then copy/paste the cache path for umount something like this:
# umount /home/magento/public_html/var/cache
most likely as root - may need to contact you sysadmin and explain.
The script should run -- ah but it's not over!
need to
mkdir -p /home/magento/public_html/var/cache
otherwise it isn't there to delete. what a cruddy script. just delete the contents of the folder!
add a comment |
This is probably the cache folder being mounted in tmpfs - which is one of the recommended speed boosts for magento - you had it right to umount it - but you need to find it first, issue:
df -h
Sample cropped output:
none 2.0G 0 2.0G 0% /home/magentolive/public_html/var/cache
then copy/paste the cache path for umount something like this:
# umount /home/magento/public_html/var/cache
most likely as root - may need to contact you sysadmin and explain.
The script should run -- ah but it's not over!
need to
mkdir -p /home/magento/public_html/var/cache
otherwise it isn't there to delete. what a cruddy script. just delete the contents of the folder!
add a comment |
This is probably the cache folder being mounted in tmpfs - which is one of the recommended speed boosts for magento - you had it right to umount it - but you need to find it first, issue:
df -h
Sample cropped output:
none 2.0G 0 2.0G 0% /home/magentolive/public_html/var/cache
then copy/paste the cache path for umount something like this:
# umount /home/magento/public_html/var/cache
most likely as root - may need to contact you sysadmin and explain.
The script should run -- ah but it's not over!
need to
mkdir -p /home/magento/public_html/var/cache
otherwise it isn't there to delete. what a cruddy script. just delete the contents of the folder!
This is probably the cache folder being mounted in tmpfs - which is one of the recommended speed boosts for magento - you had it right to umount it - but you need to find it first, issue:
df -h
Sample cropped output:
none 2.0G 0 2.0G 0% /home/magentolive/public_html/var/cache
then copy/paste the cache path for umount something like this:
# umount /home/magento/public_html/var/cache
most likely as root - may need to contact you sysadmin and explain.
The script should run -- ah but it's not over!
need to
mkdir -p /home/magento/public_html/var/cache
otherwise it isn't there to delete. what a cruddy script. just delete the contents of the folder!
answered 14 mins ago
wuxmediawuxmedia
111
111
add a comment |
add a comment |
Run below command to remove the var/cache folder:
rm -rf ./var/cache/*
Also use this command to remove the pub static.
rm -rf ./pub/static/*
After run upgrade and deployment command to re-generate that folders.
add a comment |
Run below command to remove the var/cache folder:
rm -rf ./var/cache/*
Also use this command to remove the pub static.
rm -rf ./pub/static/*
After run upgrade and deployment command to re-generate that folders.
add a comment |
Run below command to remove the var/cache folder:
rm -rf ./var/cache/*
Also use this command to remove the pub static.
rm -rf ./pub/static/*
After run upgrade and deployment command to re-generate that folders.
Run below command to remove the var/cache folder:
rm -rf ./var/cache/*
Also use this command to remove the pub static.
rm -rf ./pub/static/*
After run upgrade and deployment command to re-generate that folders.
answered 11 mins ago
Mohammad FaizanMohammad Faizan
213
213
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f152058%2fcannot-delete-var-cache-folder-magento-2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Does your user have access to said folder?
– Julien Lachal
Dec 27 '16 at 15:53
This is more of server issue than a Magento one, you likely have a process using the directory. Have you tried to
lsof +D var/cache
to find out what process this might be?– Jonathan Wommack
Dec 27 '16 at 19:11