• About Us
  • Announce
  • Privacy Policy
  • Contact us
MasterTrend Info - Technology, News and Tutorials
22 ยฐc
Ashburn
26 ยฐ Tue
21 ยฐ Wed
  • HOME
    • BLOG
  • Tutorials
  • Hardware
  • Gaming
  • Mobile
  • Security
  • Windows
  • IA
  • Software
  • Networks
  • What's new
  • en_USEnglish
    • es_ESSpanish
    • pt_BRPortuguese
    • fr_FRFrench
    • it_ITItalian
    • de_DEGerman
    • ko_KRKorean
    • jaJapanese
    • zh_CNChinese
    • ru_RURussian
    • thThai
    • pl_PLPolish
    • tr_TRTurkish
    • id_IDIndonesian
    • hi_INHindi
    • arArabic
    • sv_SESwedish
    • nl_NLDutch
No result
See all results
  • HOME
    • BLOG
  • Tutorials
  • Hardware
  • Gaming
  • Mobile
  • Security
  • Windows
  • IA
  • Software
  • Networks
  • What's new
  • en_USEnglish
    • es_ESSpanish
    • pt_BRPortuguese
    • fr_FRFrench
    • it_ITItalian
    • de_DEGerman
    • ko_KRKorean
    • jaJapanese
    • zh_CNChinese
    • ru_RURussian
    • thThai
    • pl_PLPolish
    • tr_TRTurkish
    • id_IDIndonesian
    • hi_INHindi
    • arArabic
    • sv_SESwedish
    • nl_NLDutch
No result
See all results
MasterTrend Info - Technology, News and Tutorials
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 min read
0
6 Commands to Clean Ubuntu: Free Up Space NOW!
393
SHARED
1.1k
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:
1FacebookLinkedInPinterestXRedditTumblrBlueskyThreadsShareChatGPTClaudeGoogle AIGrok
1
SHARE
Tags: EvergreenContentProductivityTechtips
Previous Publication

Windows Phone Link: 5 Hidden Tricks You Should Try NOW ๐Ÿ”ฅ๐Ÿ“ฑ

next post

โš ๏ธ Local System Host Service: Fix your hard drive 100% easily โœ…

MasterTrend Insights

MasterTrend Insights

Our editorial team shares a deep-dive analysis, tutorials and recommendations for getting the most out of your devices and digital tools.

RelatedPublications

WiFi Calling on iPhone. Woman showing on an iPhone the WiFi Calling option enabled in settings, guide on how to enable and use WiFi Calling on iPhone step by step.
Tutorials

WiFi Calling on iPhone: how to enable and use it

April 26, 2026
148
Advanced on-screen TV settings with brightness, contrast, sharpness, color, motion flow and HDR tone mapping configuration on a 4K UHD TV displaying a cinematic scene in high definition.
Tutorials

Advanced TV settings: what to change and what to avoid

April 7, 2026
247
iPhone call forwarding activated from settings, showing the โ€œCall Forwardingโ€ option enabled on the mobile phone screen.
Tutorials

iPhone call forwarding: how to activate and use it

April 27, 2026
221
Actual charging speed on your Android phone shown in a charging meter app with amperage and battery status on screen, while a woman holds the smartphone in a technology store.
Tutorials

Actual Loading Speed โ€‹โ€‹on Your Android Phone

February 22, 2026
172
Accidental Echo Activation - Woman annoyed by the accidental activation of Alexa on an Amazon Echo speaker in a domestic living room.
Tutorials

Accidental activation of Echo on Amazon speakers

February 9, 2026
178
PNG to PDF Methods - Illustration of methods to convert PNG files to PDF, showing PNG and PDF icons with a conversion arrow between both formats.
Tutorials

PNG to PDF conversion methods: A comparison to help you choose in Windows 11

April 27, 2026
301
next post
How to fix high disk, CPU, and memory usage of the Host Service: Local System.

โš ๏ธ Local System Host Service: Fix your hard drive 100% easily โœ…

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

Stay Connected

  • 976 Fans
  • 118 Followers
  • 1.4 k Followers
  • 1.8 k Subscribers
  • Trends
  • Comments
  • Last
๐Ÿ–ฅ๏ธ How to open 'Devices and printers' in Windows 11: 4 simple steps

๐ŸŒŸ How to open โ€˜Devices and printersโ€™ in Windows 11: ยกAmazing trick!

April 28, 2026
Windows 11 Persistent Clock

Windows 11 Persistent Clock: Options, Limits, and Real Decisions

April 28, 2026
Ethernet not working in Windows 11: 9 easy tricks

Ethernet not working in Windows 11: 3-minute solution โšก๐ŸŒ

13 November 2025
How to save game in REPO

How to save game in REPO ๐Ÿ”ฅ Discover the secret to not losing progress

7 July 2025
Features of Gmail on Android: Save time with 5 tips

Features of Gmail in Android: you 5 tricks you did not know! ๐Ÿ“ฑโœจ

12
Repair of motherboards - Repair MotherBoards

Repair of motherboards of Laptops

10
Install Windows 11 Home without Internet

Install Windows 11 Home without Internet

10
How to backup drivers in Windows 11/10 in 4 steps!

How to backup drivers in Windows 11/10 It Prevents errors! ๐Ÿšจ๐Ÿ’พ

10
AMD UDNA architecture for PS6 and Xbox Next, detail of next-generation GPU chip with advanced design for high-performance gaming consoles.

UDNA architecture in PS6 and Xbox Next: more than just numbers

4 de May de 2026
FBC Firebreak Weapons: Unlock and Priorities - Tactical operators with shotguns and flamethrowers in combat surrounded by fire in intense video game scene.

FBC Firebreak Weapons: Unlocking and Priorities

May 3, 2026
Strategy Heroes Olden Era: White-haired warrior heroine making key decisions in an epic fantasy battle that change the course of the game.

Heroes Olden Era Strategy: Game-Changing Decisions

May 3, 2026
Shoring Up Defenses in Arc Raiders: real strategy with player in desert facing enemy drones in intense sci-fi tactical battle.

Shoring Up Defenses in Arc Raiders: Royal Strategy

May 3, 2026

Recent News

AMD UDNA architecture for PS6 and Xbox Next, detail of next-generation GPU chip with advanced design for high-performance gaming consoles.

UDNA architecture in PS6 and Xbox Next: more than just numbers

4 de May de 2026
107
FBC Firebreak Weapons: Unlock and Priorities - Tactical operators with shotguns and flamethrowers in combat surrounded by fire in intense video game scene.

FBC Firebreak Weapons: Unlocking and Priorities

May 3, 2026
99
Strategy Heroes Olden Era: White-haired warrior heroine making key decisions in an epic fantasy battle that change the course of the game.

Heroes Olden Era Strategy: Game-Changing Decisions

May 3, 2026
138
Shoring Up Defenses in Arc Raiders: real strategy with player in desert facing enemy drones in intense sci-fi tactical battle.

Shoring Up Defenses in Arc Raiders: Royal Strategy

May 3, 2026
104
MasterTrend Info logo

MasterTrend Info is your source of reference in technology: discover news, tutorials, and analysis of hardware, software, gaming, mobile, and artificial intelligence. Subscribe to our newsletter and don't miss any trend.

Follow us

Browse by Category

  • Gaming
  • Hardware
  • IA
  • Mobile
  • What's new
  • Networks
  • Security
  • Software
  • Tutorials
  • Windows

Recent News

AMD UDNA architecture for PS6 and Xbox Next, detail of next-generation GPU chip with advanced design for high-performance gaming consoles.

UDNA architecture in PS6 and Xbox Next: more than just numbers

4 de May de 2026
FBC Firebreak Weapons: Unlock and Priorities - Tactical operators with shotguns and flamethrowers in combat surrounded by fire in intense video game scene.

FBC Firebreak Weapons: Unlocking and Priorities

May 3, 2026
  • 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:
es_ES Spanish
es_ES Spanish
en_US English
pt_BR Portuguese
fr_FR French
it_IT Italian
ru_RU Russian
de_DE German
zh_CN Chinese
ko_KR Korean
ja Japanese
th Thai
hi_IN Hindi
ar Arabic
tr_TR Turkish
pl_PL Polish
id_ID Indonesian
nl_NL Dutch
sv_SE Swedish
Change Language
Close and do not switch language
No result
See all results
  • en_USEnglish
    • es_ESSpanish
    • pt_BRPortuguese
    • fr_FRFrench
    • it_ITItalian
    • de_DEGerman
    • ko_KRKorean
    • jaJapanese
    • zh_CNChinese
    • ru_RURussian
    • pl_PLPolish
    • id_IDIndonesian
    • tr_TRTurkish
    • hi_INHindi
    • thThai
    • arArabic
    • sv_SESwedish
    • nl_NLDutch
  • Gaming
  • Hardware
  • IA
  • Mobile
  • What's new
  • Networks
  • Security
  • Software
  • Tutorials
  • Windows

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

wpDiscuz
RedditBlueskyXMastodonHacker News
Share this:
MastodonVKWhatsAppTelegramSMSLineMessengerFlipboardHacker NewsMixNextdoorPerplexityXingYummly
Your Mastodon Instance