Can I delete /var/log files because of low root space in Ubuntu?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







3















Is it possible to have 64.5GB log files in Ubuntu? Can I delete those files? My laptop is dual booted and the Ubuntu partition is only 100GB.










share|improve this question















migrated from stackoverflow.com 9 hours ago


This question came from our site for professional and enthusiast programmers.














  • 2





    Quick answer, yes, you can delete your /var/log files but I'm wondering why is that folder so big?. Cheers, sigfried.

    – sigfried
    15 hours ago


















3















Is it possible to have 64.5GB log files in Ubuntu? Can I delete those files? My laptop is dual booted and the Ubuntu partition is only 100GB.










share|improve this question















migrated from stackoverflow.com 9 hours ago


This question came from our site for professional and enthusiast programmers.














  • 2





    Quick answer, yes, you can delete your /var/log files but I'm wondering why is that folder so big?. Cheers, sigfried.

    – sigfried
    15 hours ago














3












3








3








Is it possible to have 64.5GB log files in Ubuntu? Can I delete those files? My laptop is dual booted and the Ubuntu partition is only 100GB.










share|improve this question
















Is it possible to have 64.5GB log files in Ubuntu? Can I delete those files? My laptop is dual booted and the Ubuntu partition is only 100GB.







disk-usage log






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 5 mins ago









Melebius

5,12852142




5,12852142










asked 15 hours ago









NishaNisha

163




163




migrated from stackoverflow.com 9 hours ago


This question came from our site for professional and enthusiast programmers.









migrated from stackoverflow.com 9 hours ago


This question came from our site for professional and enthusiast programmers.










  • 2





    Quick answer, yes, you can delete your /var/log files but I'm wondering why is that folder so big?. Cheers, sigfried.

    – sigfried
    15 hours ago














  • 2





    Quick answer, yes, you can delete your /var/log files but I'm wondering why is that folder so big?. Cheers, sigfried.

    – sigfried
    15 hours ago








2




2





Quick answer, yes, you can delete your /var/log files but I'm wondering why is that folder so big?. Cheers, sigfried.

– sigfried
15 hours ago





Quick answer, yes, you can delete your /var/log files but I'm wondering why is that folder so big?. Cheers, sigfried.

– sigfried
15 hours ago










2 Answers
2






active

oldest

votes


















3















Can I delete those files ?




Yes, but do not. EMPTY them instead of deleting. Deleting files from /var/log/ requires the file to be unused and most log files are open. In theory deleting the file might crash the service that uses this log. Not a big issue unless you are hosting something that can not have downtime.



You can empty it with:



echo "" > logfile


Another note: please do not empty them without at least examining why these exists. Those logs will return and return and return. Fixing the issue that is being logged will keep those logs small.






share|improve this answer
























  • > logfile .... also works

    – Scott Stensland
    3 hours ago











  • Yeah. I deleted log files and it return same size. Again I deleted those files using same method I used before. But now there's an error when power on my laptop . Error : file '/boot/grub/i386-pc/normal.mod' not found

    – Nisha
    2 mins ago





















1














Also make sure you remove old unused kernels. they can take up a lot of space.






share|improve this answer
























  • This is a comment, not an answer to the question.

    – Melebius
    7 mins ago












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1138180%2fcan-i-delete-var-log-files-because-of-low-root-space-in-ubuntu%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









3















Can I delete those files ?




Yes, but do not. EMPTY them instead of deleting. Deleting files from /var/log/ requires the file to be unused and most log files are open. In theory deleting the file might crash the service that uses this log. Not a big issue unless you are hosting something that can not have downtime.



You can empty it with:



echo "" > logfile


Another note: please do not empty them without at least examining why these exists. Those logs will return and return and return. Fixing the issue that is being logged will keep those logs small.






share|improve this answer
























  • > logfile .... also works

    – Scott Stensland
    3 hours ago











  • Yeah. I deleted log files and it return same size. Again I deleted those files using same method I used before. But now there's an error when power on my laptop . Error : file '/boot/grub/i386-pc/normal.mod' not found

    – Nisha
    2 mins ago


















3















Can I delete those files ?




Yes, but do not. EMPTY them instead of deleting. Deleting files from /var/log/ requires the file to be unused and most log files are open. In theory deleting the file might crash the service that uses this log. Not a big issue unless you are hosting something that can not have downtime.



You can empty it with:



echo "" > logfile


Another note: please do not empty them without at least examining why these exists. Those logs will return and return and return. Fixing the issue that is being logged will keep those logs small.






share|improve this answer
























  • > logfile .... also works

    – Scott Stensland
    3 hours ago











  • Yeah. I deleted log files and it return same size. Again I deleted those files using same method I used before. But now there's an error when power on my laptop . Error : file '/boot/grub/i386-pc/normal.mod' not found

    – Nisha
    2 mins ago
















3












3








3








Can I delete those files ?




Yes, but do not. EMPTY them instead of deleting. Deleting files from /var/log/ requires the file to be unused and most log files are open. In theory deleting the file might crash the service that uses this log. Not a big issue unless you are hosting something that can not have downtime.



You can empty it with:



echo "" > logfile


Another note: please do not empty them without at least examining why these exists. Those logs will return and return and return. Fixing the issue that is being logged will keep those logs small.






share|improve this answer














Can I delete those files ?




Yes, but do not. EMPTY them instead of deleting. Deleting files from /var/log/ requires the file to be unused and most log files are open. In theory deleting the file might crash the service that uses this log. Not a big issue unless you are hosting something that can not have downtime.



You can empty it with:



echo "" > logfile


Another note: please do not empty them without at least examining why these exists. Those logs will return and return and return. Fixing the issue that is being logged will keep those logs small.







share|improve this answer












share|improve this answer



share|improve this answer










answered 9 hours ago









RinzwindRinzwind

211k28406541




211k28406541













  • > logfile .... also works

    – Scott Stensland
    3 hours ago











  • Yeah. I deleted log files and it return same size. Again I deleted those files using same method I used before. But now there's an error when power on my laptop . Error : file '/boot/grub/i386-pc/normal.mod' not found

    – Nisha
    2 mins ago





















  • > logfile .... also works

    – Scott Stensland
    3 hours ago











  • Yeah. I deleted log files and it return same size. Again I deleted those files using same method I used before. But now there's an error when power on my laptop . Error : file '/boot/grub/i386-pc/normal.mod' not found

    – Nisha
    2 mins ago



















> logfile .... also works

– Scott Stensland
3 hours ago





> logfile .... also works

– Scott Stensland
3 hours ago













Yeah. I deleted log files and it return same size. Again I deleted those files using same method I used before. But now there's an error when power on my laptop . Error : file '/boot/grub/i386-pc/normal.mod' not found

– Nisha
2 mins ago







Yeah. I deleted log files and it return same size. Again I deleted those files using same method I used before. But now there's an error when power on my laptop . Error : file '/boot/grub/i386-pc/normal.mod' not found

– Nisha
2 mins ago















1














Also make sure you remove old unused kernels. they can take up a lot of space.






share|improve this answer
























  • This is a comment, not an answer to the question.

    – Melebius
    7 mins ago
















1














Also make sure you remove old unused kernels. they can take up a lot of space.






share|improve this answer
























  • This is a comment, not an answer to the question.

    – Melebius
    7 mins ago














1












1








1







Also make sure you remove old unused kernels. they can take up a lot of space.






share|improve this answer













Also make sure you remove old unused kernels. they can take up a lot of space.







share|improve this answer












share|improve this answer



share|improve this answer










answered 7 hours ago









kc1dikc1di

1046




1046













  • This is a comment, not an answer to the question.

    – Melebius
    7 mins ago



















  • This is a comment, not an answer to the question.

    – Melebius
    7 mins ago

















This is a comment, not an answer to the question.

– Melebius
7 mins ago





This is a comment, not an answer to the question.

– Melebius
7 mins ago


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1138180%2fcan-i-delete-var-log-files-because-of-low-root-space-in-ubuntu%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

GameSpot

connect to host localhost port 22: Connection refused

Getting a Wifi WPA2 wifi connection