
Now, there are ways to clean systemd journal logs. You can check the log size with this command: journalctl -disk-usage The problem is that over time, these logs take a considerable amount of disk space. You’ll have kernel logging data, system log messages, standard output and errors for various services in Ubuntu. Clear systemd journal logs Įvery Linux distribution has a logging mechanism that helps you investigate what’s going on in your system. Or delete apt cache in its entirety (frees more disk space): sudo apt-get clean 4.

Now, you have two ways to clean the APT cache.Įither remove only the outdated packages, like those superseded by a recent update, making them completely unnecessary. When you are almost out of space, this 500 Mb can make a lot of difference.

You can see the size of this cache with the du command below: sudo du -sh /var/cache/aptĪs you can see, I have over 500 Mb of cache storage. Over time, this cache can grow quite large and hold a lot of packages you don’t need. The APT package management system keeps a cache of DEB packages in /var/cache/apt/archives.
#CLEAN DISK SPACE LINUX SOFTWARE#
Ubuntu uses APT (Advanced Package Tool) for installing, removing and managing software on the system, and in doing so it keeps a cache of previously downloaded and installed packages even after they’ve been uninstalled. You can remove a program in Ubuntu from the software centre or use the command below with the particular app names: sudo apt-get remove package-name1 package-name2 3.

If you need space more getting rid of the unused or lesser used applications is always a good idea. Maybe you installed them on the back of an awesome review, out of nosiness, or to handle a particular task. You can find installed apps in Software CenterĬhances are that you have a number of apps installed that you seldom use. Don’t trust me? Go and find all the installed software on your Ubuntu system. We all have a few games and/or applications that we hardly use.
#CLEAN DISK SPACE LINUX FREE#
It’s a no-brainer command that you can run from time to time to make some free space on your Ubuntu system: sudo apt-get autoremoveĪs you can see, this command is going to free up 300 Mb of free space in my system. It also removes old Linux kernels that were installed automatically in the system upgrade. If that package is removed, these automatically installed packages are useless in the system. This option removes libs and packages that were installed automatically to satisfy the dependencies of an installed package. If you read the apt-get commands guide, you might have come across the apt-get command option ‘autoremove’.

Get rid of packages that are no longer required
#CLEAN DISK SPACE LINUX HOW TO#
If you prefer videos, I have made a video to show you how to clean Ubuntu. I am using Ubuntu while writing this tutorial but you can use the same steps for Ubuntu versions, Linux Mint, elementary OS, and other Ubuntu-based Linux distributions. Not that you cannot use them, but it’s better to avoid them if you don’t know what you are doing. While I have mentioned several ways here, if you are a beginner, avoid the ones marked as ‘expert’. I have discussed several command-line tricks here followed by some GUI options. There are several ways you clean up disk space in Ubuntu and other Ubuntu-based system. How to free up disk space in Ubuntu and Linux Mint
