Free Up Disk Space on Linux

Need to Free Up Disk Space on Linux Server or Desktop? You’ve come to the right place. Perhaps you have seen our other article about how to check disk space on Linux.

When facing low disk space issues on a Linux system, there are several symptoms that may indicate the problem. Here are some common signs to look out for:

  • Warning Messages:
    • Linux systems often generate warning messages when the available disk space is critically low. Keep an eye on system notifications, logs, or terminal messages for alerts regarding low disk space.
  • Failed Software Updates:
    • If you notice that software updates or installations are failing, it could be due to insufficient disk space. The package manager might require space to download and install updates.
  • Slow System Performance:
    • Low disk space can significantly impact system performance. As the available space decreases, it may lead to slower response times for applications and the overall system.
  • Application Errors:
    • Some applications may start throwing errors or crash unexpectedly when they can’t write data due to lack of disk space. Check application logs for any error messages related to disk space issues.
  • Unresponsive System:
    • In extreme cases, a lack of disk space may render the system unresponsive. The operating system may struggle to perform basic functions, leading to freezing or crashing.
  • Unable to Save Files:
    • If you’re unable to save new files or data, it could be a clear indication of insufficient disk space. The operating system needs space to write and store user data.
  • Difficulty Logging In:
    • Insufficient disk space can affect the ability to log in, especially if the system requires space for creating temporary files during the login process.
  • System Warnings in GUI:
    • Graphical user interfaces (GUIs) in Linux environments often provide visual warnings or alerts when disk space is running low. This could include notifications on the desktop or file manager.

How to Free Up Disk Space on Linux

Step 1 – Work out What Is using the Disk Space

This is often the trickiest part of the entire process. It can be hard to know what is eating up your disk space. Is it a process that has gone rogue, or is it a log file that is spamming verbose? Who knows! But let’s find out how to Free Up Disk Space on Linux

The easiest way to read your hard disk is to use the du command. If you just use the du command, it will list endless directories, which is not very helpful. You could narrow it down by using a specific folder to check, but that only works if you know what folder is filling up your hard drive.

For Example, let’s check my /tmp folder but only list the top 10 biggest folders.

Bash
sudo du -h --max-depth=1 /tmp | sort -rh | head -n 11

Below is my output. You can see the root of /tmp is 270 MB in size, and listed are the biggest 10 folders, sorted by size, largest to smallest.

Bash
270M	/tmp
269M	/tmp/ollama2115724660
744K	/tmp/v8-compile-cache-1000
342K	/tmp/snap-private-tmp
222K	/tmp/pkg-TqDcR8
30K	/tmp/.com.google.Chrome.tGZUvs
18K	/tmp/systemd-private-1f1b7e094b504f18891cf3247dddd4e4-upower.service-uPEGSc
18K	/tmp/systemd-private-1f1b7e094b504f18891cf3247dddd4e4-systemd-timesyncd.service-s4RoAW
18K	/tmp/systemd-private-1f1b7e094b504f18891cf3247dddd4e4-systemd-resolved.service-sAq0tJ
18K	/tmp/systemd-private-1f1b7e094b504f18891cf3247dddd4e4-systemd-oomd.service-GYMie5
18K	/tmp/systemd-private-1f1b7e094b504f18891cf3247dddd4e4-systemd-logind.service-J4DnMA

You can repeat this against the entire filesystem if you want.

Bash
du -h --max-depth=1 / 2>/dev/null | sort -rh | awk '{if ($1 != "0") printf "%-40s%-10s\n", $2, $1}' | head -n 11

This is my output

Bash
/                                       79G       
/home                                   38G       
/snap                                   17G       
/usr                                    13G       
/var                                    8.7G      
/installables                           2.6G      
/boot                                   353M      
/opt                                    321M      
/etc                                    16M       
/run                                    3.1M      
/tmp                                    1.4M 

You can immediately see that my home folder is the biggest folder on my system, and a perfect start to Free Up Disk Space on Linux

Here are some of my favorite disk space commands:

Bash
#List Top Disk-consuming Files:
find / -type f -exec du -h {} + | sort -rh | head -n 10 

#List Top Disk-consuming Directories:
du -h --max-depth=1 /path/to/directory | sort -rh | head -n 11

#Find Large Files in Home Directory:
find ~/ -type f -exec du -h {} + | sort -rh | head -n 10

#Identify Large Files Older Than X Days:
find / -type f -mtime +X -exec du -h {} + | sort -rh | head -n 10

#Find and Delete Large Log Files:
find /var/log -type f -size +100M -exec ls -lh {} + | awk '{print $9, $5}'

Step 2 – Clean Package Cache (Debian / Ubuntu)

If you install packages frequently, or if you have just upgraded/updated your systems. There is a good chance your apt-cache can be cleared down to Free Up Disk Space on Linux

Want to see how much of your cache is being used? You can run this command:

Bash
du -sh /var/cache/apt

You will see output similar to this:

Bash
530M /var/cache/apt

To clear the cache just type:

Bash
sudo apt-get clean

Step 3 – Clear down old Linux Kernel to Free Up Disk Space on Linux

When you update your Operating System, the Kernel is not always cleaned by default. This is because in the event of a system crash, you can always change the kernel used at System Boot. However, over time the number of Kernels will grow, and clearing them down is a great way to Free Up Disk Space on Linux.

Keep in mind that the actual packages might include architecture-specific information (e.g., “linux-image-5.4.0-72-generic” for a specific version). If you want to see only the version numbers, you may need to parse the output further.

Bash
dpkg-query -W -f='${binary:Package}\t${Version}\t${Installed-Size}\n' | grep linux-image | awk '{printf "%s\t%s\t%.2f MB\n", $1, $2, $3/1024}'

This command retrieves information about installed Debian packages, filters for those related to Linux kernel images, and then prints a formatted list containing the package name, version, and installed size in megabytes.

You will see output similar to this:

Bash
dpkg-query -W -f='${binary:Package}\t${Version}\t${Installed-Size}\n' | grep linux-image | awk '{printf "%s\t%s\t%.2f MB\n", $1, $2, $3/1024}'
linux-image-5.19.0-32-generic	5.19.0-32.33~22.04.1	11.65 MB
linux-image-5.19.0-46-generic	5.19.0-46.47~22.04.1	11.69 MB
linux-image-6.2.0-26-generic	6.2.0-26.26~22.04.1	13.17 MB
linux-image-6.2.0-31-generic	6.2.0-31.31~22.04.1	13.19 MB
linux-image-6.2.0-32-generic	6.2.0-32.32~22.04.1	13.19 MB
linux-image-6.2.0-33-generic	6.2.0-33.33~22.04.1	13.18 MB
linux-image-6.2.0-34-generic	6.2.0-34.34~22.04.1	13.19 MB
linux-image-6.2.0-35-generic	6.2.0-35.35~22.04.1	13.19 MB
linux-image-6.2.0-36-generic	6.2.0-36.37~22.04.1	13.19 MB
linux-image-6.2.0-37-generic	6.2.0-37.38~22.04.1	13.19 MB
linux-image-6.2.0-39-generic	6.2.0-39.40~22.04.1	13.19 MB
linux-image-6.5.0-14-generic	6.5.0-14.14~22.04.1	13.60 MB
linux-image-6.5.0-15-generic	6.5.0-15.15~22.04.1	13.61 MB
linux-image-generic-hwe-22.04	6.5.0.15.15~22.04.8	0.02 MB

If you are happy to remove the Kernel you can do so by using this command. You may want to keep at least one or two older kernels as a backup in case there are issues with the latest one. Always check that your system is stable after removing old kernels before proceeding further.

Elsewhere On TurboGeek:  Unveiling the Power of Kali Linux

Bash
sudo apt-get remove <kernel-package-name>

Step 4 – Truncate Log Files to Free Up Disk Space on Linux

The /var/log directory on a Linux system is where various log files are stored. These log files contain information about system events, processes, and applications.

Examples of common log files within /var/log:

  • syslog: General system log file capturing a variety of events.
  • auth.log or secure: Logs related to authentication and security.
  • messages: General system messages.
  • kern.log: Kernel-related messages.
  • apache2/access.log and apache2/error.log: Apache web server access and error logs.
  • mysql/error.log: MySQL database server error log.
  • Access Permissions: Usually, access to the /var/log directory and its log files is restricted to system administrators (root or users with elevated privileges) to maintain the integrity and security of the logs.

Lets take a look at the 5 biggest files in my /var/log folder. Run this command:

Bash
du -h --max-depth=1 /var/log 2>/dev/null | sort -rh | awk '{if ($1 != "0") printf "%-40s%-10s\n", $2, $1}' | head -n 5

This is the output I get:

Bash
/var/log/journal                        1.2G          
/var/log/aws-vpn-client                 885K      
/var/log/installer                      610K      
/var/log/apt                            262K      
/var/log/cups                           89K       

Stop! Before you go truncating files, make sure you understand the risk, and only do the truncate if you are certain.

  • /var/log/journal (1.2G):
    • Purpose: This directory contains logs managed by systemd-journald. It stores system logs in a binary format.
    • Usage: Used for centralized and structured logging, allowing easy retrieval and analysis of system events.
  • /var/log/aws-vpn-client (885K):
    • Purpose: Logs related to the AWS VPN client, which is a tool for connecting to AWS Virtual Private Clouds (VPCs).
    • Usage: Records events and activities related to VPN connections.
  • /var/log/installer (610K):
    • Purpose: Logs related to the system installation process.
    • Usage: Helpful for diagnosing issues during the installation of the operating system.
  • /var/log/apt (262K):
    • Purpose: Logs related to package management using APT (Advanced Package Tool).
    • Usage: Captures information about package installations, upgrades, and removals.
  • /var/log/cups (89K):
    • Purpose: Logs for the Common Unix Printing System (CUPS), which manages printing services.
    • Usage: Contains information about print jobs, errors, and printer status.

Ok. I am going to truncate my journal. I don’t need the system information saved within it and clearing 1.2gb of space is a great way to Free Up Disk Space on Linux. First, see what the content of the journal folder is:

Bash
ls -ltr /var/log/journal/*

The output will look something like this:

Bash
ls -lt /var/log/journal/*
total 1240420
-rw-r-----+ 1 root systemd-journal  50331648 Jan 30 14:31 user-1000.journal
-rw-r-----+ 1 root systemd-journal  16777216 Jan 30 14:30 system.journal
-rw-r-----+ 1 root systemd-journal   8388608 Jan 29 09:07 user-1000@2e265f34e6a14803823b578e4eea6c89-0000000000000aff-00061011efc14e37.journal
-rw-r-----+ 1 root systemd-journal   8388608 Jan 29 09:07 system@bca49b03ec774fd78035d42e1549aa2b-0000000000000001-00061011ee35f742.journal
-rw-r-----+ 1 root systemd-journal  41943040 Jan 29 09:04 [email protected]~
-rw-r-----+ 1 root systemd-journal  16777216 Jan 29 09:04 [email protected]~
-rw-r-----+ 1 root systemd-journal  58720256 Jan 26 07:46 user-1000@9f3553b61d8e4207b25a6956f77e5143-000000000000d463-00060fa368f492e6.journal
-rw-r-----+ 1 root systemd-journal  25165824 Jan 26 07:46 system@2281a3a61b5d4951b8c08dc274dbbfbd-000000000000d461-00060fa368f24908.journal
-rw-r-----+ 1 root systemd-journal  50331648 Jan 23 21:12 user-1000@9f3553b61d8e4207b25a6956f77e5143-0000000000000f10-00060f7ab9193c03.journal
-rw-r-----+ 1 root systemd-journal  16777216 Jan 23 21:12 system@2281a3a61b5d4951b8c08dc274dbbfbd-0000000000000f0e-00060f7ab918525e.journal
-rw-r-----+ 1 root systemd-journal   8388608 Jan 21 20:40 user-1000@9f3553b61d8e4207b25a6956f77e5143-0000000000000b16-00060f7ab8ad9631.journal
-rw-r-----+ 1 root systemd-journal   8388608 Jan 21 20:40 system@2281a3a61b5d4951b8c08dc274dbbfbd-0000000000000001-00060f7ab7698e0d.journal
-rw-r-----+ 1 root systemd-journal  25165824 Jan 21 20:40 [email protected]~
-rw-r-----+ 1 root systemd-journal   8388608 Jan 21 20:39 [email protected]~
-rw-r-----+ 1 root systemd-journal 134217728 Jan 18 19:23 user-1000@7a03370c7c794f85922428e204ab5f0a-0000000000042078-00060ecf689f6e5f.journal
-rw-r-----+ 1 root systemd-journal  25165824 Jan 18 19:23 system@378f5fccae094b6a94904dccc07c8131-0000000000042072-00060ecf688dcc88.journal
-rw-r-----+ 1 root systemd-journal  33554432 Jan 13 08:17 user-1000@7a03370c7c794f85922428e204ab5f0a-000000000003a5e8-00060ebb5e5d3bdf.journal
-rw-r-----+ 1 root systemd-journal  16777216 Jan 13 08:17 system@378f5fccae094b6a94904dccc07c8131-000000000003a5e6-00060ebb5e57ad98.journal
-rw-r-----+ 1 root systemd-journal  25165824 Jan 12 08:22 user-1000@7a03370c7c794f85922428e204ab5f0a-00000000000343b0-00060ea811d48212.journal
-rw-r-----+ 1 root systemd-journal  16777216 Jan 12 08:22 system@378f5fccae094b6a94904dccc07c8131-0000000000034383-00060ea811d11245.journal
-rw-r-----+ 1 root systemd-journal  75497472 Jan 11 09:21 user-1000@7a03370c7c794f85922428e204ab5f0a-000000000001efac-00060e61104d6f32.journal
-rw-r-----+ 1 root systemd-journal   8388608 Jan 11 09:21 system@378f5fccae094b6a94904dccc07c8131-0000000000000001-00060ea80fef74d8.journal
-rw-r-----+ 1 root systemd-journal  25165824 Jan 11 09:20 [email protected]~
-rw-r-----+ 1 root systemd-journal  16777216 Jan  7 20:38 user-1000@7a03370c7c794f85922428e204ab5f0a-000000000001bbc7-00060e4d3f0cee88.journal
-rw-r-----+ 1 root systemd-journal   8388608 Jan  7 20:38 system@bfc8e9cc054542228f0ec9f4f9a414be-000000000001bbc5-00060e4d3f0a27dc.journal
-rw-r-----+ 1 root systemd-journal 100663296 Jan  6 20:59 user-1000@7a03370c7c794f85922428e204ab5f0a-0000000000000c58-00060d6dfd7884aa.journal
-rw-r-----+ 1 root systemd-journal  33554432 Jan  6 20:59 system@bfc8e9cc054542228f0ec9f4f9a414be-0000000000000c56-00060d6dfd7385ac.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec 26 18:38 user-1000@7a03370c7c794f85922428e204ab5f0a-0000000000000af6-00060d6dfd546bcd.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec 26 18:38 system@bfc8e9cc054542228f0ec9f4f9a414be-0000000000000001-00060d6dfbc264a4.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec 26 18:38 [email protected]~
-rw-r-----+ 1 root systemd-journal   8388608 Dec 26 18:38 [email protected]~
-rw-r-----+ 1 root systemd-journal 125829120 Dec 24 06:23 user-1000@66107075283644c18e8fef201d42b94c-0000000000001170-00060cb410852200.journal
-rw-r-----+ 1 root systemd-journal  25165824 Dec 24 06:23 system@0e31a8878846444d896d30d1a15a6306-000000000000116b-00060cb4107ec279.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec 17 12:49 user-1000@66107075283644c18e8fef201d42b94c-0000000000000aa7-00060cb40c03d563.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec 17 12:49 system@0e31a8878846444d896d30d1a15a6306-0000000000000001-00060cb40b32e136.journal
-rw-r-----+ 1 root systemd-journal  33554432 Dec 17 12:48 [email protected]~
-rw-r-----+ 1 root systemd-journal 109051904 Dec 17 12:48 [email protected]~
-rw-r-----+ 1 root systemd-journal 134217728 Dec 13 15:44 system@a8db2dc329724741884014a7c599f3c4-00000000000ab8be-00060c65e8fa2281.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec 13 15:44 user-1000@ab02870d624c4d478517e04e0ae69575-00000000000b207d-00060c65ee4abfde.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec 13 15:35 system@a8db2dc329724741884014a7c599f3c4-0000000000082faf-00060c65c6d5b678.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec 13 15:35 user-1000@ab02870d624c4d478517e04e0ae69575-000000000008479f-00060c65c8d68140.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec 13 15:25 system@a8db2dc329724741884014a7c599f3c4-000000000005b6d7-00060c6597280ab1.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec 13 15:25 user-1000@ab02870d624c4d478517e04e0ae69575-000000000005c8b7-00060c659882dda3.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec 13 15:12 system@a8db2dc329724741884014a7c599f3c4-000000000003340c-00060c656f71ed08.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec 13 15:12 user-1000@ab02870d624c4d478517e04e0ae69575-0000000000033733-00060c656fcbb6ac.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec 13 15:01 system@a8db2dc329724741884014a7c599f3c4-0000000000000001-00060c381f015d9e.journal
-rw-r-----+ 1 root systemd-journal  58720256 Dec 13 15:01 user-1000@ab02870d624c4d478517e04e0ae69575-0000000000000ae5-00060c38203f8ab5.journal
-rw-r-----+ 1 root systemd-journal  25165824 Dec 11 08:57 [email protected]~
-rw-r-----+ 1 root systemd-journal  33554432 Dec 11 08:57 [email protected]~
-rw-r-----+ 1 root systemd-journal 134217728 Dec  9 08:31 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000009911b5-00060c0316556f4f.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  9 08:31 user-1000@b6533e59c78343bf8451405a150570d3-0000000000991f51-00060c03171677ee.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 17:40 system@bf5a9195f76f46d1918ae3ce0af6483f-0000000000968a12-00060c02f0aaa39b.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 17:40 user-1000@b6533e59c78343bf8451405a150570d3-000000000096998e-00060c02f16c1d98.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 17:30 system@bf5a9195f76f46d1918ae3ce0af6483f-0000000000940147-00060c0292376322.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 17:30 user-1000@b6533e59c78343bf8451405a150570d3-0000000000945452-00060c02965c1d58.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 17:04 system@bf5a9195f76f46d1918ae3ce0af6483f-000000000091726a-00060c02725268f6.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 17:04 user-1000@b6533e59c78343bf8451405a150570d3-00000000009176aa-00060c02727a661b.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 16:55 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000008ee46e-00060c0252146217.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 16:55 user-1000@b6533e59c78343bf8451405a150570d3-00000000008eea89-00060c025260503b.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 16:46 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000008c564d-00060c0232147ad6.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 16:46 user-1000@b6533e59c78343bf8451405a150570d3-00000000008d326e-00060c023ca7aae0.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 16:37 system@bf5a9195f76f46d1918ae3ce0af6483f-000000000089c9ce-00060c0212485be4.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 16:37 user-1000@b6533e59c78343bf8451405a150570d3-00000000008a27cb-00060c0216c2c229.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 16:28 system@bf5a9195f76f46d1918ae3ce0af6483f-0000000000873c9c-00060c01f2069cde.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 16:28 user-1000@b6533e59c78343bf8451405a150570d3-00000000008775d9-00060c01f4e412fe.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 16:19 system@bf5a9195f76f46d1918ae3ce0af6483f-000000000084aeed-00060c01d23b421e.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 16:19 user-1000@b6533e59c78343bf8451405a150570d3-000000000084f6bd-00060c01d5e57254.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 16:10 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000008220d5-00060c01b3238d31.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 16:10 user-1000@b6533e59c78343bf8451405a150570d3-00000000008317de-00060c01bf116c7b.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 16:01 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000007f91ae-00060c0193d62690.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 16:01 user-1000@b6533e59c78343bf8451405a150570d3-00000000007f9750-00060c019430cc62.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 15:52 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000007d0303-00060c017483ec1b.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 15:52 user-1000@b6533e59c78343bf8451405a150570d3-00000000007df705-00060c01802e7340.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 15:44 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000007a746e-00060c01551755e6.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 15:44 user-1000@b6533e59c78343bf8451405a150570d3-00000000007a7e3a-00060c015583f934.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 15:35 system@bf5a9195f76f46d1918ae3ce0af6483f-000000000077e5c8-00060c0135c1abf1.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 15:35 user-1000@b6533e59c78343bf8451405a150570d3-000000000078227a-00060c0138a75332.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 15:26 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000007557e0-00060c011636cf73.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 15:26 user-1000@b6533e59c78343bf8451405a150570d3-0000000000762167-00060c011fdf0efb.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 15:17 system@bf5a9195f76f46d1918ae3ce0af6483f-000000000072c9ee-00060c00f68cf426.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 15:17 user-1000@b6533e59c78343bf8451405a150570d3-000000000072cc98-00060c00f6cab728.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 15:08 system@bf5a9195f76f46d1918ae3ce0af6483f-0000000000703ba5-00060c00d75d2dae.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 15:08 user-1000@b6533e59c78343bf8451405a150570d3-000000000070df0b-00060c00df3e1971.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 15:00 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000006daccb-00060c00b82e50aa.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 15:00 user-1000@b6533e59c78343bf8451405a150570d3-00000000006df138-00060c00bb7a700c.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 14:51 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000006b1e2c-00060c009903639d.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 14:51 user-1000@b6533e59c78343bf8451405a150570d3-00000000006c7859-00060c00a99897ea.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 14:42 system@bf5a9195f76f46d1918ae3ce0af6483f-0000000000688ff0-00060c0079d98640.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 14:42 user-1000@b6533e59c78343bf8451405a150570d3-000000000068f966-00060c007ef05d44.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 14:34 system@bf5a9195f76f46d1918ae3ce0af6483f-0000000000660153-00060c005ab0b407.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 14:34 user-1000@b6533e59c78343bf8451405a150570d3-00000000006651ae-00060c005e8476c8.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 14:25 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000006373ca-00060c003b867635.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 14:25 user-1000@b6533e59c78343bf8451405a150570d3-0000000000647210-00060c00479b2ab8.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 14:16 system@bf5a9195f76f46d1918ae3ce0af6483f-000000000060e4aa-00060c001c7f24a9.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 14:16 user-1000@b6533e59c78343bf8451405a150570d3-0000000000614178-00060c0020ec189a.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 14:07 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000005e5623-00060bfffd741dc0.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 14:07 user-1000@b6533e59c78343bf8451405a150570d3-00000000005e8fc4-00060c000013cb81.journal
-rw-r-----+ 1 root systemd-journal 134217728 Dec  8 13:59 system@bf5a9195f76f46d1918ae3ce0af6483f-00000000005bc7bf-00060bffde4a5f58.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 13:59 user-1000@b6533e59c78343bf8451405a150570d3-00000000005d17ef-00060bffee31f3b3.journal
-rw-r-----+ 1 root systemd-journal   8388608 Dec  8 13:50 user-1000@b6533e59c78343bf8451405a150570d3-000000000059f036-00060bffc804f538.journal


Free Up Disk Space on Linux

I will now Truncate all the journals

Elsewhere On TurboGeek:  Super Useful Linux One-Liners

Bash
sudo truncate -s 0 /var/log/journal/1301d4d0705a4efca0baa670e1d1df94/*

Now when I list my folder, its truncates the logs and saves me nearly 1GB of data! What a great way to Free Up Disk Space on Linux

Bash
ls -lht /var/log/journal/*
total 10K
-rw-r-----+ 1 root systemd-journal 8.0M Jan 30 14:33 user-1000.journal
-rw-r-----+ 1 root systemd-journal 8.0M Jan 30 14:33 system.journal

That’s all for now. These are 4 of the best ways to Free Up Disk Space on Linux; just be careful.

Richard.Bailey

Richard Bailey, a seasoned tech enthusiast, combines a passion for innovation with a knack for simplifying complex concepts. With over a decade in the industry, he's pioneered transformative solutions, blending creativity with technical prowess. An avid writer, Richard's articles resonate with readers, offering insightful perspectives that bridge the gap between technology and everyday life. His commitment to excellence and tireless pursuit of knowledge continues to inspire and shape the tech landscape.

You may also like...

Leave a Reply

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

Translate ยป