Disk Space Full in Linux Ubuntu or Mint: How to Fix it?

Imagine you’re trying to download something from a website, but as soon as you hit the download button, you get a message saying, ‘out of storage space.‘ Now, what should you do in such a situation? You’ve checked all your files, inspected your drive, but the solutions seem elusive. What kind of files could be causing your disk to fill up on your Ubuntu or Mint operating system? Well, you’re in the right place. In this short article, we’ll tell you in detail how to fix the disk full issue on your Ubuntu or Mint operating system, complete with images for easy understanding.

Why Occur Disk Space Issue?

Disk Space Full in Linux

There are various reasons for disk space getting full, but today we will discuss the most important topic, which is the creation of log files in the system. These are the files that the system saves logs to in a .log format. Some of the names of these log files include:

  • syslog
  • syslog.1
  • syslog.2
  • kern.log
  • kern.log.1

In this manner, several log files are created, especially in Debian operating systems like Ubuntu and Mint OS, where this challenge is most commonly encountered.

Learn more about the: How To Fix Initramfs Error On Boot Menu in any Linux OS

How to Find System Log Files in Linux

Finding log files is extremely easy; you don’t even need to use a terminal for it. You can check system files through the graphical interface.

Firstly, open the disk usage analyzer by searching in start button.

Next, select the disk volume of your system, as shown in the image below for reference.

disk volume of your system

After that, navigate to the directory that is consuming the most disk space. In most cases, this is within the “var” directory.

var folder

Then, you need to find subdirectories containing files that are taking up the most disk space. In our case, these are log files, as mentioned in the paragraph above. Hence, we’ll select the log directory, as shown in the image below.

var folder and lib folder

Lastly, analyze the files to identify which ones are unimportant but are consuming significant disk space, such as the ones mentioned in the paragraph above. These are the files you need to remove.

system log files

How to Fix Disk Space Full Issue on Linux

In the steps mentioned above, we identified the files consuming the most disk space and their location. Now, we need to simply remove them using the Linux terminal and some simple commands.

To do this, first open your terminal.

Then, navigate to the location where your files are located. For example, the first command would be:

cd /var
cd log

With these two commands, we’ll navigate to our files’ directory. After that, you need to delete the files. To do this, we need to use a command with root permissions.

In the next step, type the following command: sudo rm "yourfilename" and then enter your computer password and press Enter. This command will delete the specified file.

how to remove large storage files

You can see an example in the image below. you can also use all command which is showing in image if you have same issue.

terminal commands to remove disk files


managing disk space in Linux systems like Ubuntu or Mint is straightforward with the right tools and knowledge. By identifying and removing large storage files, such as log files, users can optimize system performance and prevent disk space issues. With a combination of graphical interface tools and terminal commands, disk space management becomes accessible to all users, ensuring efficient system operation.

Leave a Reply

Your email address will not be published. Required fields are marked *