• About Us
  • Announce
  • Privacy Policy
  • Contact us
MasterTrend News
  • HOME
    • BLOG
    • STORE
  • Tutorials
  • Hardware
  • Gaming
  • Mobiles
  • Security
  • Windows
  • AI
  • Software
  • Networks
  • News
  • English
    • Spanish
    • Portuguese
    • French
    • Italian
    • German
    • Korean
    • Japanese
    • Chinese
    • Russian
    • Thai
    • Polish
    • Turkish
    • Indonesian
    • Hindi
    • Arabic
    • Swedish
    • Dutch
No result
See all results
  • HOME
    • BLOG
    • STORE
  • Tutorials
  • Hardware
  • Gaming
  • Mobiles
  • Security
  • Windows
  • AI
  • Software
  • Networks
  • News
  • English
    • Spanish
    • Portuguese
    • French
    • Italian
    • German
    • Korean
    • Japanese
    • Chinese
    • Russian
    • Thai
    • Polish
    • Turkish
    • Indonesian
    • Hindi
    • Arabic
    • Swedish
    • Dutch
No result
See all results
MasterTrend News
No result
See all results
Start Tutorials

6 Commands to Clean Ubuntu: Make Your PC Look Like New! 🔥🖥️

MasterTrend Insights by MasterTrend Insights
April 15, 2025
in Tutorials
Reading time: 6-minute read
TO TO
0
6 Commands to Clean Ubuntu: Free Up Space NOW!
116
SHARED
321
Views
Share on FacebookShare on Twitter

Contents

  1. 6 Commands to Clean Up Ubuntu: Free Up Space NOW! 💻✨
  2. 1. Uninstall Programs
  3. 2. Clear the APT Cache
  4. 3. Remove Packages You No Longer Need
  5. 4. Clean the Journal Records
  6. 5. Clear the Thumbnail Cache
  7. 6. Delete Duplicate Files

6 Commands to Clean Up Ubuntu: Free Up Space NOW! 💻✨

Keeping your computer free of digital clutter is essential for its maintenance, as is ensuring you always have space for new files and programs. Here are some simple commands that will allow you to clean up your Ubuntu system from the terminal, without having to use the graphical interface—well, with one exception. 🖥️✨

Please note that in most cases these commands will work on any system Based on Debian. I tested them on both an Ubuntu installation and a Linux Mint machine. On both systems, I actually freed up a lot more space than I expected. 🎉

1.  Uninstall Programs

The first step to cleaning your system Ubuntu is to check the programs you have installed and remove them. To do this, you'll need to get a list of everything installed on your system. There are two terminal commands for this:

dpkg --list

Or alternatively this one:

apt list --installed

However, I'm not a fan of this approach as it will result in huge lists that you'll have to manually navigate through, plus it will include dependencies you may not be familiar with. Unless you know what you're doing, it's better to go to your list of installed applications in the graphical interface. Depending on the system you're using, there are different locations, but it's usually in your Software Center. Below, I'll show you what it looks like in Linux Mint.

Image of a list of installed programs in Linux Mint.

To uninstall programs, simply do so through the Software Center or enter the following in Terminal:

sudo apt-get remove program-name

Remember, you can group multiple programs into a single command; just add their names without commas or anything else. For more details, check out our full article on how to uninstall software in Ubuntu. 📦💻

2.  Clear the APT Cache

Most Debian-based distributions, including Ubuntu, use APT to manage programs. However, APT maintains a cache of downloaded files and doesn't automatically clean it up. If you've been using your system for a while, it could take up a lot of space, so you need to clean it up and get some space back on disk. 💾🧹

First, let's find out how much space the cache is using with the "du" command. We also need to add the cache location, which is /var/cache/apt by default.

sudo du -sh /var/cache/apt

You will receive a short message showing how much space the directory is taking up.

Image of the result of the query about the application cache size.

Almost 600MB in my case, which is worth clearing. To do so, enter the following command:

sudo apt-get clean

In my case, this left only 44KB of files in the cache, a much better result! 🎊

Image of the terminal output when clearing the Ubuntu cache.

If you'd like, you can also disable automatic package caching so you don't have to deal with this issue again. 🛠️🚫

3.  Remove Packages You No Longer Need

One of the biggest ways I was losing space was by not removing unnecessary packages, leftovers from when I installed a program and I didn't uninstall the installer. Ubuntu offers a very simple command that cleans up all these unnecessary files:

sudo apt-get autoremove

This cleans up installers, as well as all kinds of package files. Some of them, like kernel updates, are huge, and if you haven't cleaned up in a while, this can save you several gigabytes of disk space. For example, I freed up almost 1GB of space on my Mint installation. 🎈🌟

Image of the terminal output when using autoremove on Ubuntu.

4.  Clean Journal Records

Like any computer system, Ubuntu logs what happens on the system. All the actions you perform, connections established, and other things are stored in logs that are never deleted. These are mostly saved in simple text files, but because there are so many of them, the cumulative effect is considerable. 📜⚡

You can run the following command to find out how much space your logs are taking up:

journalctl --disk-usage

I did this and found they were taking up over 3GB, which is excessive. To remove this, the simplest command is the following, where the number indicates how many days you want to go back. As a precaution, I chose a week.

sudo journalctl --vacuum-time=7d

This cleared almost the entire 3.3GB, leaving me with a much more manageable 24MB. ⚖️📉

Image of the terminal output after cleaning the logs.

5.  Clear the Thumbnail Cache

Every time you add a photo to Ubuntu, a thumbnail is created for easy viewing in the file manager. However, these thumbnails survive even after the images they depend on are deleted, meaning they're just another class of useless files taking up space on your system. To find out exactly how much, run the following command, which, as before, uses the "du" command. 📸🗑️

du -sh ~/.cache/thumbnails

The dot before “cache” indicates that this is a hidden directory, although that won’t affect how you interact with it.

In my case, the directory had over 300MB of files, which meant it needed to be cleaned up. The best way to do this is with the following command:

rm -rf ~/.cache/thumbnails/*

I then checked the directory size again and found it was now only 4KB - an absolutely incredible change! 🎉📁

Image of the terminal output when clearing thumbnails in Ubuntu.

6.  Delete Duplicate Files

Finally, you also have the option to find and remove duplicate files. Unfortunately, Ubuntu doesn't have built-in tools for this. Instead, I recommend reading our article on how to find and remove duplicate files in Linux, which has several ways to do so. 🔍✂️

I followed the instructions in our article and managed to remove almost 500MB of duplicate files that were taking up space on my hard drive, which makes a huge difference! 🚀


Using any or all of these tips, you can easily free up several gigabytes of space on your system Ubuntu. If you specifically need more space to speed up your system's boot, check out our guide on how to free up space on your Linux boot partition. 🚀🗄️

Share this:
FacebookLinkedInPinterestXRedditTumblrBlueskyThreadsShareChatGPTClaudeGoogle AIGrok

Related Articles:

  • Amazing games for integrated video
    30 amazing games for Intel integrated video
    Amazing games for Intel integrated video. Learn more now!
  • Linux Mint vs Ubuntu: 3 Key Differences You Should Know
    Linux Mint vs Ubuntu: Which System Is Best for You? 🔥🔧
    Linux Mint vs. Ubuntu: Discover their differences in design and software management to choose the ideal one! Easy and fast!
  • 30 free games for PC
    Free PC Games - Best Free PC Games
    Discover the best free PC games that you can download right now and enjoy hours of fun without spending…
  • How to Install Slack on Linux 🚀 Easy Guide to Get Started Today!
    How to Install Slack on Linux 💻 Step by Step…
    How to install Slack on Linux 💬 Discover the quick and easy process to use Slack on your favorite distro without…
  • How to Install Linux in 3 Easy Steps (Without Erasing Windows)
    How to Install and Try Linux Risk-Free! Get started today! 🔥🐧
    How to Install Linux Easily and Securely: Try It Without Erasing Windows! Make the switch today! 💻🐧⚡
  • How to choose a graphics card
    How to choose a graphics card
    What do I need to choose a good video card? Learn more now!
Tags: Evergreen ContentProductivityTechTips
Previous Post

Windows Phone Link: 5 Hidden Tricks You Should Try NOW 🔥📱

Next publication

⚠️ Local System Host Service: Fix disk at 100% easily ✅

MasterTrend Insights

MasterTrend Insights

Our editorial team shares in-depth reviews, tutorials, and recommendations to help you get the most out of your digital devices and tools.

Next publication
How to fix high disk, CPU, and memory usage of the Host Service: Local System.

⚠️ Local System Host Service: Fix disk at 100% easily ✅

5 2 votes
Article Rating
Subscribe
Access
Notify of
guest
guest
0 Comments
Oldest
Newest Most voted
Online comments
View all comments

Stay Connected

  • 976 Fans
  • 118 Followers
  • 1.4k Followers
  • 1.8k Subscribers

Don't miss the latest in technology and gaming.
Exclusive tips, how-to guides, and analysis every day.

Subscription Form
  • Tendencies
  • Comments
  • Last
How to add a clock to the Windows 11 desktop: 3 surefire tricks!

How to add a clock to your Windows 11 desktop: Get more done in minutes! ⏱️

May 1, 2025
How to save game in REPO

How to save your game in REPO 🔥 Discover the secret to not losing progress

July 7, 2025
12 Best Alternatives to Lucky Patcher for Android

Lucky Patcher Alternatives: 12 Better and Easy Apps! 🎮⚡

May 12, 2025
🖥️ How to open 'Devices and Printers' in Windows 11: 4 easy steps

🌟 How to Open 'Devices and Printers' in Windows 11: Amazing Trick!

February 27, 2025
Gmail Features on Android: Save Time with 5 Tips

Gmail Features on Android: 5 Tricks You Didn't Know About! 📱✨

12
Motherboard repair - Repair Motherboards

Notebook Motherboard Repair

10
Install Windows 11 Home without Internet

Install Windows 11 Home without Internet

10
How to Back Up Drivers in Windows 11/10 in 4 Steps!

How to Back Up Drivers in Windows 11/10: Avoid Errors! 🚨💾

10
Weapons from Doom The Dark Ages: The Doom Slayer aims twin cannons from a siege machine in a dark, cavernous environment.

Doom The Dark Ages Weapons: 23 Weapons Revealed ⚔️🔥

November 7, 2025
Slow smartphone - Woman showing her smartphone with 100% screen and upward arrow, illustrating 5 easy tricks to speed up and optimize a slow mobile.

Slow smartphone: turn off these 3 options and it'll fly 🚀

November 7, 2025
Steam on Chromebook Plus: Gamer with controller against three Chromebooks running PC games, proving you can play like on a laptop.

Steam on Chromebook Plus: Play like a laptop! 🎮⚡

November 7, 2025
Upgrading weapons and shields - Doom The Dark Ages: Capture the Sentinel Sanctuary and where to spend currency to upgrade weapons and shields; upgrade guide and secret tricks.

Upgrade weapons and shields 🛡️ Secret tricks in Doom The Dark Ages 😱

November 7, 2025

Recent News

Weapons from Doom The Dark Ages: The Doom Slayer aims twin cannons from a siege machine in a dark, cavernous environment.

Doom The Dark Ages Weapons: 23 Weapons Revealed ⚔️🔥

November 7, 2025
2
Slow smartphone - Woman showing her smartphone with 100% screen and upward arrow, illustrating 5 easy tricks to speed up and optimize a slow mobile.

Slow smartphone: turn off these 3 options and it'll fly 🚀

November 7, 2025
2
Steam on Chromebook Plus: Gamer with controller against three Chromebooks running PC games, proving you can play like on a laptop.

Steam on Chromebook Plus: Play like a laptop! 🎮⚡

November 7, 2025
18
Upgrading weapons and shields - Doom The Dark Ages: Capture the Sentinel Sanctuary and where to spend currency to upgrade weapons and shields; upgrade guide and secret tricks.

Upgrade weapons and shields 🛡️ Secret tricks in Doom The Dark Ages 😱

November 7, 2025
18
MasterTrend News logo

MasterTrend Info is your go-to source for technology: discover news, tutorials, and analysis on hardware, software, gaming, mobile devices, and artificial intelligence. Subscribe to our newsletter and don't miss any trends.

Follow us

Browse by Category

  • Gaming
  • Hardware
  • AI
  • Mobiles
  • News
  • Networks
  • Security
  • Software
  • Tutorials
  • Windows

Recent News

Weapons from Doom The Dark Ages: The Doom Slayer aims twin cannons from a siege machine in a dark, cavernous environment.

Doom The Dark Ages Weapons: 23 Weapons Revealed ⚔️🔥

November 7, 2025
Slow smartphone - Woman showing her smartphone with 100% screen and upward arrow, illustrating 5 easy tricks to speed up and optimize a slow mobile.

Slow smartphone: turn off these 3 options and it'll fly 🚀

November 7, 2025
  • About Us
  • Announce
  • Privacy Policy
  • Contact us

Copyright © 2025 https://mastertrend.info/ - All rights reserved. All trademarks are property of their respective owners.

We've detected you might be speaking a different language. Do you want to change to:
Change language to Spanish Spanish
Change language to Spanish Spanish
English
Change language to Portuguese Portuguese
Change language to French French
Change language to Italian Italian
Change language to Russian Russian
Change language to German German
Change language to Chinese Chinese
Change language to Korean Korean
Change language to Japanese Japanese
Change language to Thai Thai
Change language to Hindi Hindi
Change language to Arabic Arabic
Change language to Turkish Turkish
Change language to Polish Polish
Change language to Indonesian Indonesian
Change language to Dutch Dutch
Change language to Swedish Swedish
Change Language
Close and do not switch language
No result
See all results
  • English
    • Spanish
    • Portuguese
    • French
    • Italian
    • German
    • Korean
    • Japanese
    • Chinese
    • Russian
    • Polish
    • Indonesian
    • Turkish
    • Hindi
    • Thai
    • Arabic
    • Swedish
    • Dutch
  • Gaming
  • Hardware
  • AI
  • Mobiles
  • News
  • Networks
  • Security
  • Software
  • Tutorials
  • Windows

Copyright © 2025 https://mastertrend.info/ - All rights reserved. All trademarks are property of their respective owners.

Comment Author Info
:wpds_smile::wpds_grin::wpds_wink::wpds_mrgreen::wpds_neutral::wpds_twisted::wpds_arrow::wpds_shock::wpds_unamused::wpds_cool::wpds_evil::wpds_oops::wpds_razz::wpds_roll::wpds_cry::wpds_eek::wpds_lol::wpds_mad::wpds_sad::wpds_exclamation::wpds_question::wpds_idea::wpds_hmm::wpds_beg::wpds_whew::wpds_chuckle::wpds_silly::wpds_envy::wpds_shutmouth:
wpDiscuz
RedditBlueskyXMastodonHacker News
Share this:
MastodonVKWhatsAppTelegramSMSLineMessengerFlipboardHacker NewsMixNextdoorPerplexityXingYummly
Your Mastodon Instance