Table of Contents >> Show >> Hide
- Why Ubuntu Slows Down Over Time
- Start With the Basics: Update Ubuntu Properly
- Clean APT Cache and Remove Unused Packages
- Remove Old Kernels Safely
- Find What Is Eating Your Disk Space
- Clean System Logs Without Breaking Troubleshooting
- Remove Unused Snap Packages and Old Revisions
- Clean Flatpak Apps and Unused Runtimes
- Clear Thumbnail Cache
- Clean Browser Cache the Smart Way
- Disable Unnecessary Startup Applications
- Review GNOME Extensions
- Use the Right Power Mode
- Enable and Check SSD TRIM
- Check Running Services
- Reduce Swapping and Improve Low-Memory Performance
- Speed Up Ubuntu by Choosing Lighter Apps
- Keep the Desktop Clean and Practical
- A Safe Ubuntu Cleanup Routine
- What Not to Do When Cleaning Ubuntu
- When Cleaning Is Not Enough
- Personal Experience: What Actually Makes Ubuntu Feel Faster
- Conclusion
Ubuntu is famous for being friendly, stable, and refreshingly free from the “why is my fan screaming?” drama that can follow other operating systems around like a needy cat. But even Ubuntu can slow down over time. Old package caches pile up, unused dependencies linger, system logs grow, Snap and Flatpak apps keep extra runtimes, startup apps sneak into your login session, and your once-snappy desktop begins acting like it has just woken up from a nap.
The good news is that cleaning and speeding up Ubuntu does not require magic, risky scripts, or a mysterious “PC optimizer” with a glowing rocket icon. In most cases, you can make Ubuntu feel faster by doing simple, safe maintenance: update packages, remove what you no longer use, clean caches, manage startup programs, check disk space, reduce background services, and tune your desktop environment.
This guide walks you through practical ways to clean Ubuntu, free disk space, and improve performance without turning your system into a science experiment. Whether you use Ubuntu on a laptop, desktop, workstation, or lightweight home server, these steps will help you keep it tidy, responsive, and easier to live with.
Why Ubuntu Slows Down Over Time
Ubuntu does not usually slow down because it is “getting old.” Linux systems can run happily for years. Slowdowns usually happen because your system accumulates things: downloaded package files, old kernels, leftover dependencies, browser cache, thumbnails, logs, startup apps, and extensions. Individually, these are small. Together, they can become the digital equivalent of a closet where every cable you have owned since 2009 still lives.
Performance also depends on your hardware. A laptop with 4GB of RAM, a spinning hard drive, and a dozen browser tabs will feel very different from a desktop with 32GB of RAM and an NVMe SSD. Ubuntu is efficient, but it still has to obey physics. The goal is not to chase fake “one-click turbo speed.” The goal is to remove friction so your system has more room to breathe.
Start With the Basics: Update Ubuntu Properly
Before cleaning anything, update your system. Updates fix bugs, improve security, and sometimes solve performance issues that look like mysterious gremlins but are actually old packages behaving badly.
The first command refreshes Ubuntu’s package list. The second upgrades installed packages. If Ubuntu asks for confirmation, read the package list before pressing Enter. Usually it is routine, but it is a good habit to know what your system is changing.
For systems that need deeper dependency handling, you may also see this command recommended:
Use it when you understand that it may install new packages or remove old ones to complete an upgrade. For normal desktop maintenance, sudo apt upgrade is often enough.
Clean APT Cache and Remove Unused Packages
APT is Ubuntu’s classic package management system. When you install or update software, APT downloads package files and may keep them in a local cache. This can be useful, but over time the cache can grow. Cleaning it is one of the safest ways to recover disk space.
Remove unused dependencies
When you uninstall an application, some packages that were installed as dependencies may no longer be needed. Ubuntu can remove those orphaned packages with:
This is especially helpful after removing large applications, desktop environments, drivers, or older kernels. Read the list carefully before confirming. If Ubuntu wants to remove something that looks important, stop and investigate first.
Clean downloaded package files
To clear the local package cache completely, run:
To remove only outdated package files that can no longer be downloaded from repositories, use:
A practical monthly cleanup command looks like this:
If disk space is tight, use sudo apt clean instead of autoclean. Think of autoclean as light housekeeping and clean as emptying the whole package-cache closet.
Remove Old Kernels Safely
Ubuntu keeps older Linux kernels so you can boot into a previous version if the newest one causes trouble. That safety net is useful, but too many old kernels can take up space in /boot or on your main drive.
In most cases, this command handles old kernel cleanup safely:
Do not manually delete kernel files from /boot unless you know exactly what you are doing. That is how innocent people turn a simple cleanup into a dramatic rescue mission involving a live USB and regret.
Find What Is Eating Your Disk Space
Before deleting random files, check where your storage is going. Ubuntu includes simple command-line tools for this.
This shows disk usage for mounted filesystems in a readable format. If your root partition is nearly full, performance can suffer and updates may fail.
To inspect folder sizes, you can use:
This checks the size of folders in your home directory and sorts them. Common space hogs include Downloads, Videos, virtual machines, ISO files, browser profiles, game data, and project folders. If you want a friendlier tool, install ncdu:
ncdu gives you an interactive view of disk usage, which is perfect for finding huge forgotten files. It is like turning on the lights in your storage room and realizing one folder has been quietly hoarding 38GB of “temporary” videos.
Clean System Logs Without Breaking Troubleshooting
Ubuntu uses systemd journal logs to record system events. Logs are important for diagnosing problems, but they can grow large on systems that run for a long time or generate repeated errors.
First, check how much space journal logs use:
To keep only the last two weeks of logs, run:
Or limit logs to a specific size, such as 500MB:
Do not delete all logs every day. Logs are useful when something breaks. The goal is balance: keep enough history to troubleshoot, but not so much that your system becomes a diary with a storage problem.
Remove Unused Snap Packages and Old Revisions
Ubuntu uses Snap for some applications. Snaps are convenient because they package apps with their dependencies, but they can also keep older revisions. That helps rollback, but it may use extra disk space.
See installed snaps with:
To see disabled old revisions, run:
Disabled revisions are usually older versions. You can remove a specific old revision like this:
Replace package-name and revision-number with the values shown in your terminal. Do not remove the active revision. When in doubt, leave it alone. A few extra megabytes are better than breaking an app you need five minutes before a meeting.
You can also reduce how many Snap revisions are retained:
This keeps fewer old revisions while preserving rollback ability.
Clean Flatpak Apps and Unused Runtimes
If you use Flatpak apps from Flathub, old runtimes and unused dependencies can accumulate. Clean them with:
Update Flatpak apps with:
If you installed many Flatpak apps to test them and later removed the apps, this cleanup can recover a surprising amount of space. Flatpak runtimes are useful, but unused runtimes are like keeping spare furniture for a house you no longer own.
Clear Thumbnail Cache
Ubuntu creates thumbnails for images, videos, PDFs, and other files. This makes file browsing faster, but the thumbnail cache can grow over time.
Check its size:
Remove cached thumbnails with:
This is generally safe. Ubuntu will recreate thumbnails as needed. After clearing them, opening folders with many images may be slower the first time, then normal again.
Clean Browser Cache the Smart Way
For many Ubuntu users, the web browser is the real operating system. Firefox, Chrome, Chromium, Brave, and other browsers can store huge caches, site data, extensions, downloads, and profiles.
Instead of deleting browser folders manually, use the browser’s built-in settings. Clear cached images and files, remove extensions you no longer use, and review site permissions. Be careful with cookies and saved logins. Clearing everything may log you out of websites, which is fine unless you enjoy surprise password-reset adventures.
Also check your Downloads folder. Many systems lose more space to forgotten ISO files, installers, ZIP archives, and duplicate videos than to anything Ubuntu itself created.
Disable Unnecessary Startup Applications
Startup apps can make Ubuntu feel slow immediately after login. Cloud sync tools, chat apps, update helpers, note apps, launchers, and background utilities may all compete for CPU, RAM, and disk access at the same time.
Open the Startup Applications tool from the Activities overview, or run:
Disable apps you do not need at login. You are not uninstalling them; you are simply telling them not to jump onto the stage the moment you sign in.
Good candidates to disable include apps you use only occasionally, extra update agents, duplicate cloud tools, and messaging apps you prefer to launch manually. Keep security tools, input method tools, accessibility tools, and essential hardware utilities enabled.
Review GNOME Extensions
GNOME Shell extensions can make Ubuntu more powerful, but too many extensions can slow the desktop, cause animation lag, or create strange bugs after upgrades. If your Ubuntu desktop feels sluggish, review your extensions.
Install the Extensions app if needed:
Then disable extensions one by one and test performance. Watch for extensions that modify the dock, top bar, window behavior, search, tiling, animations, or system indicators. Some are excellent. Some are tiny chaos engines wearing a nice icon.
After a major Ubuntu upgrade, check whether your extensions support the new GNOME version. An outdated extension can make the whole desktop feel unstable.
Use the Right Power Mode
Modern Ubuntu versions include power profiles on supported hardware. Go to Settings, then Power, and choose a mode that matches your needs.
Balanced is the best everyday choice. Power Saver helps battery life but may reduce performance. Performance, when available, can make the system more responsive at the cost of heat and battery life.
If your laptop feels slow while plugged in, check whether it is stuck in Power Saver mode. That one setting can make a capable machine feel like it is politely refusing to work hard.
Enable and Check SSD TRIM
If Ubuntu is installed on an SSD, TRIM helps the drive manage unused blocks more efficiently. Many Ubuntu systems already run periodic TRIM automatically through fstrim.timer.
Check its status:
If it is disabled, enable it:
You can run TRIM manually with:
For most desktop users, the timer is better than adding aggressive mount options. Set it, confirm it works, and let Ubuntu handle the boring maintenance. Boring is good. Boring means your storage is doing its job without sending you emotional notifications.
Check Running Services
Ubuntu runs background services for networking, printing, Bluetooth, updates, logs, virtualization, containers, databases, and more. Some are essential. Others may be unnecessary depending on your setup.
List running services with:
Do not disable services randomly. Instead, look for things you recognize and no longer use. For example, if you installed a database for an old project, a local web server, or a container platform and no longer need it, disabling it can reduce background resource usage.
To stop a service temporarily:
To prevent it from starting automatically:
Replace service-name with the exact service. Research before disabling anything unfamiliar. System services are not weeds; some are structural beams.
Reduce Swapping and Improve Low-Memory Performance
If your Ubuntu system has limited RAM, performance problems often appear when memory fills up and the system begins swapping. Swapping is normal, but heavy swapping can make a desktop feel frozen.
Check memory usage with:
For a real-time view, install and use htop:
On low-memory machines, consider using a lighter desktop environment such as Xfce or LXQt. Ubuntu flavors like Xubuntu and Lubuntu are designed for leaner systems. You can also reduce browser tabs, remove heavy extensions, and close Electron-based apps when you are not using them.
Some users benefit from compressed RAM technologies like zram or zswap, especially on systems with limited memory. These can improve responsiveness under memory pressure, but they are not magic RAM generators. If your workload needs 16GB and your laptop has 4GB, no tweak will fully replace a hardware upgrade.
Speed Up Ubuntu by Choosing Lighter Apps
Software choices matter. A lightweight text editor starts faster than a full IDE. A simple music player uses fewer resources than a giant media library manager. A minimal note app may be faster than a full workspace platform.
That does not mean you should avoid powerful apps. Use the tools you need. But if your system feels slow, ask whether you are running several heavy apps when lighter alternatives would do the job. Ubuntu gives you options, and sometimes the best performance tweak is choosing software that does not treat your RAM like an all-you-can-eat buffet.
Keep the Desktop Clean and Practical
A cluttered desktop does not usually destroy performance by itself, but it can slow your workflow. Hundreds of files on the desktop, many mounted locations, and constant indexing can make things feel messier than necessary.
Move old files into organized folders. Archive projects you no longer use. Delete duplicate downloads. Keep only active items visible. A clean desktop will not turn an old laptop into a workstation, but it will make your daily experience calmer and faster.
A Safe Ubuntu Cleanup Routine
Here is a simple routine you can run monthly:
If the thumbnail cache is large, clear it:
Then review your startup apps, browser cache, Downloads folder, and GNOME extensions. This routine is boring, safe, and effectivethe holy trinity of system maintenance.
What Not to Do When Cleaning Ubuntu
Do not paste random cleanup scripts from the internet without reading them. Do not delete folders from /usr, /lib, /var, or /boot because they “look big.” Do not remove packages blindly because a forum comment said they were unnecessary. Do not run commands with sudo unless you understand what they change.
Also be careful with “bleach everything” cleanup tools. Some can be useful when configured carefully, but aggressive settings may delete browser data, logs, recent files, shell history, or application caches you actually wanted. Cleaning is good. Cleaning with a flamethrower is less good.
When Cleaning Is Not Enough
If Ubuntu is still slow after cleanup, the issue may be hardware, drivers, or a specific app. A failing hard drive, low RAM, overheating CPU, broken graphics driver, or runaway browser process can make any operating system crawl.
Check system resources with:
Or:
Look for processes using high CPU, memory, or disk I/O. If one app is the problem, cleaning the whole system will not fix it. You need to update, reconfigure, replace, or remove that app.
For older computers, an SSD upgrade is often the biggest real-world speed improvement. More RAM also helps, especially if you multitask or use modern browsers heavily. Software cleanup is valuable, but hardware bottlenecks still matter.
Personal Experience: What Actually Makes Ubuntu Feel Faster
After working with Ubuntu on laptops, desktops, development machines, and small servers, one thing becomes clear: the biggest improvements usually come from small, boring habits repeated consistently. The dramatic “speed up Ubuntu instantly” tricks rarely matter as much as keeping the system updated, avoiding unnecessary startup apps, and not letting storage reach the danger zone.
The first thing I always check is free disk space. When the root partition is almost full, Ubuntu can behave strangely. Updates fail, logs cannot rotate properly, apps complain, and the desktop may feel sluggish. Many users assume the system is broken, but the real villain is often a Downloads folder packed with ISO files, old screen recordings, and compressed archives named final-final-real-final.zip. Cleaning those files can make the machine feel healthier immediately.
The second thing I check is startup behavior. A fresh Ubuntu installation usually feels fast because not much launches at login. Months later, the same system may start cloud sync tools, chat apps, password managers, app launchers, note tools, browser background agents, and update notifiers all at once. None of them is evil. Together, they create a traffic jam. Disabling even three or four nonessential startup apps can make login noticeably smoother.
Browser cleanup is another underrated win. Many people blame Ubuntu when the real issue is a browser with twenty extensions, hundreds of cached site files, and enough open tabs to qualify as a personal research library. Removing unused extensions and restarting the browser regularly can help more than obscure kernel tweaks. A clean Firefox or Chrome profile often feels like a new machine compared with a bloated one.
GNOME extensions are also worth reviewing. I like GNOME extensions, but I treat them like hot sauce: excellent in the right amount, questionable when poured on everything. A few well-maintained extensions can improve productivity. Too many can cause lag, conflicts, or weird behavior after system upgrades. When Ubuntu feels visually choppy, disabling extensions temporarily is one of the fastest tests.
On SSD-based systems, I make sure fstrim.timer is active and then stop worrying about it. Constant manual tuning is not necessary for most users. Ubuntu is already good at handling routine maintenance, and the best configuration is often the one you do not have to babysit.
On older machines, expectations matter. Cleaning Ubuntu helps, but it cannot turn a decade-old laptop with 4GB of RAM and a mechanical drive into a modern workstation. In those cases, switching to Xubuntu or Lubuntu can feel better than endlessly tuning standard Ubuntu. A lighter desktop environment reduces overhead and gives the hardware more room to handle actual work.
The best Ubuntu maintenance mindset is simple: clean what you understand, measure before guessing, and avoid risky shortcuts. Use official package tools. Read terminal prompts. Keep backups of important files. Remove software you no longer need. Review startup apps. Watch disk space. Keep the system updated. That approach may not sound glamorous, but it works. Your computer does not need a motivational speech; it needs fewer background tasks and enough free space to do its job.
Conclusion
Cleaning and speeding up Ubuntu is not about chasing secret commands or installing questionable optimizer apps. It is about thoughtful maintenance. Update your system, remove unused packages, clean APT cache, manage Snap and Flatpak leftovers, control system logs, review startup apps, trim SSDs, reduce heavy extensions, and choose software that matches your hardware.
Ubuntu runs best when it has enough disk space, reasonable memory usage, and fewer unnecessary processes fighting for attention. Give it that, and it will usually reward you with a smoother, faster, more reliable experience. In other words, Ubuntu does not need to be “hacked” into being fast. It just needs a little housekeepingand maybe fewer browser tabs pretending they are all essential.
Note: This article is based on current Ubuntu, APT, systemd, Snap, Flatpak, GNOME, and Linux maintenance practices. Source links are intentionally omitted as requested for clean web publishing.