{"id":676,"date":"2021-07-23T12:35:24","date_gmt":"2021-07-23T12:35:24","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/how-to-clear-a-full-partition\/"},"modified":"2021-07-23T12:35:24","modified_gmt":"2021-07-23T12:35:24","slug":"how-to-clear-a-full-partition","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/how-to-clear-a-full-partition\/","title":{"rendered":"How to Clear a Full Partition"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>This document provides the steps to clear a full partition. Usually, the <code>\/var<\/code> directory fills up first, because it holds all of the system logs.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n        The <code>\/usr<\/code> directory may also fill up quickly due to Apache.\n    <\/div>\n<\/div>\n<h2 id=\"clear-a-full-partition\">Clear a full partition<\/h2>\n<h3 id=\"check-the-directory-space-from-the-command-line\">Check the directory space from the command line.<\/h3>\n<p>To check the disk space from the command line, perform the following steps:<\/p>\n<ol>\n<li>\n<p>Log in to your server as the <code>root<\/code> user via SSH.<\/p>\n<\/li>\n<li>\n<p>Examine your system to locate the directory or log that uses the most space. To do this, change to the <code>\/var<\/code> directory and run the <code>du -sh<\/code> command.<\/p>\n<ul>\n<li>The <code>du<\/code> utility prints the estimated disk space usage of each file and directory for the path that you specified.<\/li>\n<li>The <code>-sh<\/code> argument causes the command to print the information in a human-readable format.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>The output will resemble the following example:<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 3\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 4\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 5\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 6\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 7\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 8\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\"> 9\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">10\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">11\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">12\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">13\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">14\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">15\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">16\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">17\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">18\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">19\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">20\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">21\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">22\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">23\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\">      <span style=\"color:#ae81ff\">4.0<\/span><span style=\"color:#a6e22e\">K<\/span>    .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">acllists<\/span>\n      <span style=\"color:#ae81ff\">0<\/span>   .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">analytics<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">data<\/span>\n      <span style=\"color:#ae81ff\">0<\/span>   .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">analytics<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">logs<\/span>\n      <span style=\"color:#ae81ff\">0<\/span>   .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">analytics<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">run<\/span>\n      <span style=\"color:#ae81ff\">4.0<\/span><span style=\"color:#a6e22e\">K<\/span>    .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">analytics<\/span>\n      <span style=\"color:#ae81ff\">24<\/span><span style=\"color:#a6e22e\">K<\/span> .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">plugins<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">wordpress<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">instance<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">manager<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">plugin<\/span>\n      <span style=\"color:#ae81ff\">24<\/span><span style=\"color:#a6e22e\">K<\/span> .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">plugins<\/span>\n      <span style=\"color:#ae81ff\">0<\/span>   .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">passreset<\/span>\n      <span style=\"color:#ae81ff\">8.0<\/span><span style=\"color:#a6e22e\">K<\/span>    .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">mailman<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">diskusage_cache<\/span>\n      <span style=\"color:#ae81ff\">8.0<\/span><span style=\"color:#a6e22e\">K<\/span>    .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">mailman<\/span>\n      <span style=\"color:#ae81ff\">563<\/span><span style=\"color:#a6e22e\">M<\/span>    .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span>\n      <span style=\"color:#ae81ff\">4.0<\/span><span style=\"color:#a6e22e\">K<\/span>    .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">named<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">data<\/span>\n      <span style=\"color:#ae81ff\">0<\/span>   .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">named<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">dynamic<\/span>\n      <span style=\"color:#ae81ff\">0<\/span>   .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">named<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">slaves<\/span>\n      <span style=\"color:#ae81ff\">124<\/span><span style=\"color:#a6e22e\">K<\/span>    .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">named<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cache<\/span>\n      <span style=\"color:#ae81ff\">236<\/span><span style=\"color:#a6e22e\">K<\/span>    .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">named<\/span>\n      <span style=\"color:#ae81ff\">44<\/span><span style=\"color:#a6e22e\">K<\/span> .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">www<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">html<\/span>\n      <span style=\"color:#ae81ff\">0<\/span>   .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">www<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cgi<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">bin<\/span>\n      <span style=\"color:#ae81ff\">44<\/span><span style=\"color:#a6e22e\">K<\/span> .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">www<\/span>\n      <span style=\"color:#ae81ff\">0<\/span>   .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cvs<\/span>\n      <span style=\"color:#ae81ff\">0<\/span>   .<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">proftpd<\/span>\n      <span style=\"color:#ae81ff\">2.8<\/span><span style=\"color:#a6e22e\">G<\/span>    .\n    <\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<p>The numbers in the left column of the output represent the file size of each file and directory that the specified directory path contains, in human-readable format.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n        Due to the number of files and directories in the <code>\/var<\/code> directory, this example only shows partial output from the <code>du<\/code> utility.\n    <\/div>\n<\/div>\n<\/li>\n<li>\n<p>Examine the output and determine which directories use the most space.<\/p>\n<\/li>\n<\/ol>\n<h3 id=\"delete-selected-files-and-directories\">Delete selected files and directories.<\/h3>\n<p>You can delete individual files within a directory and individual directories. To do this, perform the following steps:<\/p>\n<ol>\n<li>\n<p>Change to the directories that contain the most disk space.<\/p>\n<\/li>\n<li>\n<p>Examine the size of each file in the directory. To do this, run the <code>du -h *<\/code> command.<\/p>\n<\/li>\n<li>\n<p>The output will resemble the following example: <\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n        The following example displays the output for the <code>\/var\/www\/html<\/code> directory.\n    <\/div>\n<\/div>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">3\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">4\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">5\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">6\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">7\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">8\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#ae81ff\">4.0<\/span><span style=\"color:#a6e22e\">K<\/span>    <span style=\"color:#ae81ff\">400.<\/span><span style=\"color:#a6e22e\">shtml<\/span>\n<span style=\"color:#ae81ff\">4.0<\/span><span style=\"color:#a6e22e\">K<\/span>    <span style=\"color:#ae81ff\">401.<\/span><span style=\"color:#a6e22e\">shtml<\/span>\n<span style=\"color:#ae81ff\">4.0<\/span><span style=\"color:#a6e22e\">K<\/span>    <span style=\"color:#ae81ff\">403.<\/span><span style=\"color:#a6e22e\">shtml<\/span>\n<span style=\"color:#ae81ff\">4.0<\/span><span style=\"color:#a6e22e\">K<\/span>    <span style=\"color:#ae81ff\">404.<\/span><span style=\"color:#a6e22e\">shtml<\/span>\n<span style=\"color:#ae81ff\">4.0<\/span><span style=\"color:#a6e22e\">K<\/span>    <span style=\"color:#ae81ff\">413.<\/span><span style=\"color:#a6e22e\">shtml<\/span>\n<span style=\"color:#ae81ff\">4.0<\/span><span style=\"color:#a6e22e\">K<\/span>    <span style=\"color:#ae81ff\">500.<\/span><span style=\"color:#a6e22e\">shtml<\/span>\n<span style=\"color:#ae81ff\">12<\/span><span style=\"color:#a6e22e\">K<\/span> <span style=\"color:#a6e22e\">cp_errordocument<\/span>.<span style=\"color:#a6e22e\">shtml<\/span>\n<span style=\"color:#ae81ff\">4.0<\/span><span style=\"color:#a6e22e\">K<\/span>    <span style=\"color:#a6e22e\">index<\/span>.<span style=\"color:#a6e22e\">html<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p>Either delete the files or save the most recent entries.<\/p>\n<ul>\n<li>\n<p>To save the most recent entries, run the following commands: <\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n        In these commands, <code>filename<\/code> represents the file to delete, and <code>filename.new<\/code> represents the file to which to save the most recent entries.\n    <\/div>\n<\/div>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">3\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">tail<\/span> <span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">5000<\/span> <span style=\"color:#a6e22e\">filename<\/span> &gt; <span style=\"color:#a6e22e\">filename<\/span>.<span style=\"color:#a6e22e\">new<\/span>\n<span style=\"color:#a6e22e\">mv<\/span> <span style=\"color:#a6e22e\">filename<\/span>.<span style=\"color:#a6e22e\">new<\/span> <span style=\"color:#a6e22e\">filename<\/span>\n<span style=\"color:#a6e22e\">sync<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p>To delete the files, run the following command:<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">cat <span style=\"color:#e6db74\">\/dev\/<\/span>null <span style=\"color:#f92672\">&gt;<\/span> filename<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3 id=\"restart-the-service\">Restart the service.<\/h3>\n<p>After you delete the files and directories, restart the service that created the file. To do this, follow the directions in our How to Restart Services documentation.<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview This document provides the steps to clear a full partition. Usually, the \/var directory fills up first, because it holds all of the system logs. Note: The \/usr directory may also fill up quickly due to Apache. Clear a full partition Check the directory space from the command line. To check the disk space &hellip;<\/p>\n","protected":false},"author":1,"featured_media":677,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/676"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=676"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/676\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/677"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}