- Ubuntu's slowness is usually due to a combination of background processes, lack of cleanup, and poorly optimized configurations.
- Adjusting boot, memory (swap, zram, swappiness) and graphical environment brings great improvements even on old hardware.
- Regular cleaning, browser control, and process monitoring are key to maintaining long-term performance.
If your Ubuntu computer takes forever to boot, freezes when you open your browser, or seems to drag when switching windows, it's not just a technical quirk: you're wasting real time waiting for the system to respond . That feeling of "Ubuntu is slow" is, at its core, a loss of control over your own hardware.
Optimizing Ubuntu to stop it from running slowly isn't an optional task reserved for terminal enthusiasts; it's a very practical way to get the most out of your existing computer and combat planned obsolescence without spending a penny on new hardware . With a few well-thought-out tweaks, you can transform a sluggish Ubuntu into a fast machine, even on computers that are several years old.
Why Ubuntu gets slow over time

Most of the time, a slow Ubuntu system is not due to a single specific cause, but to the sum of small factors that accumulate : programs that load at startup without you noticing, background services, residual files, poorly optimized configurations... All of this erodes performance day by day.
Every application you install leaves a trace on the system, and many add background processes that continue running even when you don't have the window open. Cloud sync clients, automatic updates, print services, various daemons… A fresh installation can have around 150-200 processes; after months of use, that number can easily double.
The more active processes there are, the less RAM is free for what you actually use, and the harder the CPU has to work switching between tasks. Add to that a browser with 15 tabs, some resource-intensive applications, and a demanding desktop environment, and the result is a sluggish system.
Files and packages that accumulate over time also have an impact : old APT caches, orphaned packages that are no longer needed, configurations of programs you uninstalled months ago, image thumbnails that are never cleaned up… All of this takes up space and complicates disk reads and writes, something especially critical on mechanical hard drives and computers with little RAM.
When memory runs low, Ubuntu relies more heavily on swap space (disk swap memory) , which is significantly slower than physical RAM. On older hardware or with only 2-4 GB of RAM, this effect is immediately noticeable: the system starts to "think" before opening each window.
Top 3 quick actions if your Ubuntu is running very slowly
If you're short on time and just want a quick performance boost, there are three very simple maneuvers that usually have an immediate impact on most Ubuntu systems:
1. Deep system cleaning with APT
Open a terminal and run:
sudo apt autoremove && sudo apt autoclean && sudo apt clean
This combo removes orphaned packages, outdated versions of downloaded packages, and completely clears the APT cache. On systems that haven't been maintained for months, you can easily recover several gigabytes of space and significantly reduce read/write speeds.
2. Remove programs from automatic startup
From the Ubuntu menu, enter Settings > Apps > Startup apps (Or search for “Startup Apps” in the Dash.) Review each entry one by one and disable anything you don't need from the start: email clients, cloud sync, office suites, etc. Fewer things loading at startup means a much faster boot time and less RAM consumption by default.
3. Uninstall bloatware and software you don't use
Open the Ubuntu Software Center or Synaptic and locate programs you never use: pre-installed games, duplicate tools, messaging clients you don't need… To remove them completely, you can use:
sudo apt remove --purge nombre-del-paquete
The `-purge` option also deletes configuration files. Each application you remove frees up disk space and reduces potential background processes , helping the system run more smoothly.
Startup settings and services: controlling what loads
Beyond a quick overview, it's worth taking a few minutes to critically review exactly what launches when you turn on your computer . Boot time is a very clear metric of your system's health.
In GNOME environments you can reopen the Applications at startup (also from) gnome-session-properties (if you use Alt + F2) and analyze each entry. Many cloud-related programs, file synchronizers, note managers, or password managers They are added to the beginning without asking permission.Ask yourself in each case whether you need to have it open as soon as you start the computer or if you can open it manually when you need to.
Disabling a startup service doesn't mean uninstalling it; it simply stops it from receiving memory and CPU resources from the very beginning . On older laptops, this reduction can mean several seconds faster boot times and an immediate feeling of smoothness when you reach the desktop.
On systems running Ubuntu 22.04 and its derivatives, a performance issue related to the IOMMU option during kernel boot has also been documented, especially on Intel systems. If you notice unusual crashes or sluggish behavior since the release of that version, you can try disabling IOMMU for your Intel CPU from within GRUB.
To do this, edit the settings:
sudo nano /etc/default/grub
Locate the line where GRUB_CMDLINE_LINUX_DEFAULT appears and add the following parameter at the end:
intel_iommu=off
The line would look something like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=off"
Save the changes, exit nano, and apply the new configuration with:
sudo update-grub
sudo reboot
After restarting, many computers with this combination of hardware and system version show smoother behavior when managing peripherals and devices.
Advanced cleaning: caches, temporary files, and BleachBit
In addition to basic APT commands, there are extra tools and tricks to thoroughly clean Ubuntu when it becomes increasingly sluggish due to junk files and various residuals.
A very popular utility is BleachBit , available in the official repositories. It can clear application caches, delete cookies, clean browser history, temporary files, old logs, and more, all with a simple interface.
To install it, open the terminal and run:
sudo apt install bleachbit
BleachBit is available for both Linux and Windows, contains no adware or spyware, supports over 60 languages , and even allows you to overwrite free disk space so deleted files cannot be easily recovered. It offers both a graphical interface and a command-line interface, so you can integrate automatic cleanups into scripts if you want more precise control.
When you open BleachBit for the first time, you'll see an initial setup window and a list of categories (browsers, system, APT, etc.). Only select the items you know you want to clean and click "Clean." Some options are very aggressive (for example, certain configuration entries), so read each description carefully before checking any boxes.
In addition to BleachBit, there are manual cleanup actions worth knowing about. For example, you can delete the local user cache and old thumbnails from the terminal:
sudo rm -rf ~/.cache
sudo rm -rf ~/.thumbs (in many modern distros it is ~/.thumbnails)
Keep in mind that clearing the cache will cause some apps to take a little longer to open the first time while they regenerate that information, but in return, you're removing old data that no longer serves any purpose. Combine this cleanup with:
sudo apt autoclean && sudo apt clean && sudo apt autoremove
And you'll have a much clearer system, thus reducing disk load and potential bottlenecks.
Managing disk space: Disk analyzer and installed packages
When Ubuntu is slow and the disk is almost full, the first thing to do is understand what's actually taking up the space . For that, the built-in tool "Disk Analyzer" (sometimes called "Disk Usage") is invaluable.
Find it in the applications menu and run it. Select the disk or folder you want to check and wait for the analysis to complete. You'll see a graphical representation showing which directories and files are taking up the most gigabytes . This allows you to quickly locate forgotten backups, giant download folders, virtual machines, and other storage "monsters."
Once you know where the problem is, you can manually delete files from the file manager or the terminal. If you suspect you have too many packages installed that you no longer use , you can list everything on the system with:
apt list --installed | less
Navigate with the arrow keys and search for specific names using the / key . When you identify unnecessary packages, remove them with:
sudo apt remove --purge nombre-del-paquete
Again, the best approach is to take it slow and avoid randomly deleting system components . Focus on user programs, games you don't use, testing tools, etc. That alone will save you a lot of time.
How to reduce the visual weight of Ubuntu and tweak GNOME
The desktop environment has a huge impact on perceived smoothness. GNOME offers a modern and polished look, but its animations and graphical effects can be resource-intensive on older computers or those with modest graphics cards.
A very effective first step is to install GNOME Tweaks , available in the Ubuntu application store:
sudo apt install gnome-tweaks
When you open it, go to the Animations section and disable them. You can also adjust the interface scale, reduce transparency effects, and modify visual details to make the environment less demanding. The desktop will appear somewhat flatter, but in return, windows will open and move much more smoothly.
If you'd like to further customize GNOME without using the terminal, you can use the app store and graphical extensions. The Ubuntu App Store (Ubuntu Software) offers the Extension Manager , which centralizes all GNOME extensions in a visual format.
Install it by searching for “Extension Manager” (the app with the blue puzzle piece icon created by Matthew Jakeman). Once inside, you can see the pre-installed extensions and search for new ones. Some very useful ones for improving your workflow and the overall feel of the system are:
- Dash to Panel: combines dock and top bar into a single customizable panel, similar to Windows.
- Workspace Indicator: clearly shows the active work desktop and makes it easy to jump between spaces.
- ArcMenu: adds a Windows-style or classic application menu, more direct than the standard dock.
- Tray Icons: Reloaded: retrieves tray icons for apps that work in the background.
- Just Perfection: allows you to hide, modify, or disable elements of the GNOME interface that you don't need.
- GSConnect: integrates the mobile with the desktop (notifications, file sending, multimedia control, etc.).
Activating only the extensions that truly add value allows you to customize GNOME to your liking without overloading it with unnecessary features . If you notice that something is working worse after installing an extension, simply disable it from within the extension manager itself.
Memory usage: swap, zram, zswap and swappiness settings
The way Ubuntu manages memory makes a difference, especially if you frequently open many browser tabs, work with resource-intensive IDEs, or develop video games. This is where concepts like traditional swap, zram, and zswap come into play.
Classic swap involves using a file or disk partition where part of the memory is dumped when RAM is full. It works, but it's slow. To improve this, techniques like zram exist , which reserves a portion of RAM as a compressed swap device: when the system is "full," instead of directly accessing the disk, it compresses data in memory , which is usually faster than writing to an HDD or even many SSDs.
In Ubuntu you can activate zram with:
sudo apt install zram-config
After restarting, the system will automatically create zRAM devices to alleviate the load. Many users who do intensive programming or game development use a combination of, for example, 4 GB of zRAM with LZ4 compression (fast) and a larger disk swap (8 GB or similar) as a backup. With this setup, as long as memory pressure remains moderate, the system will continue to run smoothly.
Another key parameter is swappiness , which indicates how soon the kernel starts using swap instead of keeping everything in RAM. The default value is usually 60, intended for servers, but too aggressive for a desktop.
To see your current value, run:
cat /proc/sys/vm/swappiness
If it's 60, you'll probably want to lower it to 10 or 15. You can temporarily do this with:
sudo sysctl vm.swappiness=10
If you want it to be permanent, edit the system configuration file:
sudo nano /etc/sysctl.conf
Add at the end:
vm.swappiness=10
Save and close. To be on the safe side, it's recommended to make a backup first:
sudo cp /etc/sysctl.conf /etc/sysctl.conf.backup
If something goes wrong, you can always recover the original file with:
sudo mv /etc/sysctl.conf.backup /etc/sysctl.conf
By reducing swappiness, Ubuntu will try to keep data in RAM as long as possible and only use swap when it's running low, which usually results in a much more responsive desktop.
SSD, GRUB and small tweaks that add up
If you're using an SSD, it's important to ensure that automatic TRIM maintenance is enabled . TRIM helps the drive better manage blocks marked for erasure and maintain performance over time.
To view the TRIM timer status, run:
systemctl status fstrim.timer
If it appears inactive or disabled, you can activate it with:
sudo systemctl enable fstrim.timer
With this, Ubuntu will schedule a weekly task to optimize the SSD in the background. If your computer still has a mechanical hard drive (HDD), this setting is not relevant.
Another area where you can improve performance is in GRUB, the boot manager . By default, it usually displays the menu a few seconds before the system starts. If you frequently boot the same Ubuntu installation, you can reduce or even eliminate this wait.
Edit the configuration file:
sudo nano /etc/default/grub
Find the GRUB_TIMEOUT line and adjust the value:
- 5 (or whichever you prefer) to give yourself a few seconds' leeway.
- 0 to start Ubuntu directly without showing the menu.
- -1 to leave the menu on hold indefinitely until you choose an entry.
Save, close, and update GRUB with:
sudo update-grub
You're not going to gain any extra minutes of life with this, but you do cut a little bit of the total time from when you press the power button until you can start working, which is never a bad thing.
Switch desktop environment to gain speed
No matter how much you optimize services, caches, and memory, some computers still find that the primary desktop environment (GNOME, Unity in older versions, etc.) is too resource-intensive . If your computer is more than 6-8 years old or has less than 4 GB of RAM, switching to a lighter environment might be the most effective solution.
The most recommended options within the Ubuntu ecosystem are:
- Xubuntu (XFCE)A complete, modern, yet very lightweight environment. It typically consumes between 400 and 500 MB of RAM at idle.
- Lubuntu (LXQt): even lighter, ideal for computers with 2 GB of RAM or very old ones, with idle consumption of 300-350 MB.
To add XFCE to an already installed Ubuntu:
sudo apt install xubuntu-desktop
For LXQt:
sudo apt install lubuntu-desktop
During installation, you may be asked which session manager you want to use; choose your preferred option. Once finished, log out and on the home screen select the new environment from the usual icon (gear or similar next to your username).
You can keep multiple environments installed at the same time and switch between them as needed, although each one takes up between 1 and 2 GB of disk space. Once you've decided to keep one, uninstalling the previous environment frees up disk space and reduces residual packages.
If you don't want to completely change your window manager, you can always opt for just a lighter window manager (like OpenBox or Fluxbox) from your current installation, although the experience will be somewhat less polished visually.
Graphics drivers and visual performance
Desktop effects and performance in games and 3D apps depend heavily on which graphics driver you're using . If your system isn't using the correct driver, you may experience stuttering, excessive CPU usage, or a generally sluggish interface.
To check, go to Settings > Software & updates > Additional drivers . Ubuntu will then show you the available options for your card.
- In graphics IntelUsually, the correct kernel driver is already in use and you don't have to touch anything.
- On cards AMD / ATIOften it is advisable to select the recommended proprietary driver, if available, to improve 3D acceleration.
- In graphics NVIDIAIt is almost always preferable to choose the proprietary driver with the highest available number (the most recent) to obtain the best possible performance.
After applying the change, restart your system. With the correct drivers, the desktop moves more smoothly and GPU-intensive applications respond better , which overall reduces that sluggish feeling.
In practice, the program that consumes the most resources on almost any system is the web browser. Firefox, Chrome, or Chromium can easily gobble up 2-4 GB of RAM if you accumulate tabs , extensions, and resource-intensive websites.
To lighten them, there are some simple habits and adjustments:
- Control the number of tabsWhen you have 10-12 tabs open simultaneously, your data usage will skyrocket. Close anything you're not using and rely on bookmarks or saved sessions.
- Disable extensions you don't needEach extension is a small resident program. In Firefox, check
about:addons; in Chrome/Chromium, go tochrome://extensions. - Use a lightweight ad blocker, like uBlock Origin, which prevents the loading of heavy scripts and banners. It saves more resources than it consumes.
- If your needs are simple, consider lighter alternatives such as Midori o Falkonwhich usually consume considerably less memory.
In Firefox, if you want to fine-tune things, you can open about:config and adjust some advanced parameters:
- browser. sessionhistory. max_entries: Reduce from 50 to 10 so that it doesn't save such a long history per tab.
- browser.cache.memory.capacity: limits the cache size in RAM (for example, 51200 for about 50 MB).
Remember that these changes require a browser restart to take effect. If you make too many changes, you can always revert to the default settings.
Outside of the browser, it's also a good idea to choose lightweight applications when you don't need all the bells and whistles . Some examples:
- AbiWord instead of LibreOffice Writer for simple texts.
- Gnumeric instead of LibreOffice Calc if you only work with basic spreadsheets.
- Geany or Mousepad versus heavyweight IDEs for quick code or text editing.
- Mirage or Geeqie to view images, which consume less than managers like Shotwell.
- Clementine or Audacious as more frugal music players than other alternatives.
Replacing several tools with these alternatives can save you hundreds of megabytes of RAM in actual use , which is pure gold on low-powered machines.
Process priorities and Ananicy daemon
If you like fine-tuning and often have many applications open simultaneously, you can improve overall system performance by adjusting CPU and I/O priorities for processes . A fairly automated way to do this is by using Ananicy (ANother Auto NICe daemon).
Ananicy is a daemon that runs in the background and applies predefined rules to processes based on their type (multimedia, games, terminals, etc.), so that the most important ones have priority without you having to manually change the command each time. nice o renice.
To install it, you first need some tools:
sudo apt install git make schedtool
Then clone the official repository:
git clone https://github.com/Nefelim4ag/Ananicy.git
cd Ananicy
Check the directory contents and generate the package for Debian/Ubuntu:
sudo ./package.sh debian
When finished, install the resulting package:
sudo dpkg -i ./ananicy-*.deb
Restart your system and from there, Ananicy will intelligently readjust priorities , improving the response of the applications you are actually using versus less critical tasks.
Monitoring: Don't optimize blindly
Before you rush into making changes just for the sake of change, it's crucial to understand what's consuming resources at any given time . Monitoring saves you time and prevents you from "fixing" what isn't broken.
Ubuntu includes the System Monitor by default , accessible from the application search or by pressing Ctrl + Alt + Delete on many desktops. With it, you can see, in real time:
- Which processes are using the most CPU?
- How much RAM does each program use?
- Disk and network activity.
Sort by CPU or memory usage and check for any unknown processes that are constantly running . It could be a service you don't need and should disable, or, in rare cases, even malware.
If you want something more advanced, you can install htop :
sudo apt install htop
htop
It's an improved version of Top, with colors, configurable columns, and handy shortcuts. For example:
- F6: change the column you are sorting by (CPU, memory, time, etc.).
- F9: send signal to end a selected process.
- F10 oq: go out.
Be careful about killing system processes run by root without knowing what they are: you could make Ubuntu unstable . If you're unsure, it's best to search for the process name online first.
Regular maintenance: a discipline, not a one-off patch.
All of the above works much better if you make it a routine maintenance task rather than a last-minute fix when the system is already sluggish. With a few regular habits, Ubuntu will stay agile for years.
A reasonable scheme might be:
Monthly maintenance (about 10 minutes)
- Run a quick APT cleanup:
sudo apt autoremove && sudo apt autoclean. - Take a look at the System Monitor to detect any suspicious new processes.
- Clear browser caches from your privacy settings.
- Check the available disk space with
df -h.
Quarterly maintenance (about 30 minutes)
- Review the applications at startup and remove anything that has recently slipped in.
- Audit your installed software and uninstall anything you haven't used in the last three months.
sudo apt remove paquete). - Check the status of
fstrim.timerif you use an SSD. - Update the entire system with
sudo apt update && sudo apt upgrade.
Annual maintenance (2-4 hours)
- Consider a clean install if the system has too many patches, tests, and changes.
- Re-evaluate whether your current desktop environment is still suitable for your hardware.
- Make a full system backup using tools like Timeshift or Clonezilla.
- Review security aspects: passwords, SSH access, firewall, etc.
If you set reminders in your calendar, you'll avoid reaching an extreme situation where Ubuntu is so bad that it forces you to waste hours fixing problems.
In parallel, there are common-sense tips that also help: update the system regularly, clear the Firefox history and cache if you use it a lot, avoid monstrous apps when your RAM and CPU are running low, and, if the budget allows, consider upgrading memory or switching to an SSD when you're still using a mechanical hard drive.
With all these adjustments and habits, a computer that's a few years old can still perform surprisingly well, and your Ubuntu will cease to be that "slow and sluggish" system, becoming once again a fast, efficient tool, and above all, one under your control. Ultimately, performance isn't a magical state; it's the direct result of how you maintain and manage your system.