Exclusive Content:

Haiper steps out of stealth mode, secures $13.8 million seed funding for video-generative AI

Haiper Emerges from Stealth Mode with $13.8 Million Seed...

Running Your ML Notebook on Databricks: A Step-by-Step Guide

A Step-by-Step Guide to Hosting Machine Learning Notebooks in...

“Revealing Weak Infosec Practices that Open the Door for Cyber Criminals in Your Organization” • The Register

Warning: Stolen ChatGPT Credentials a Hot Commodity on the...

Clear Disk Space by Deleting Old Snap Versions

Freeing Up Disk Space on Ubuntu: How to Manage Snap Revisions

Understanding Snap Revisions and Their Importance

Checking Disk Usage: Identifying Space Hogs

A Step-by-Step Guide to Removing Disabled Snap Revisions

The Temporary Nature of Snap Cleanup: What to Expect

Running Out of Disk Space on Ubuntu? Check Your Snap Revisions!

If you’ve ever received those dreaded low disk space warnings on your Ubuntu system, particularly on a modest 40GB partition, you know the feeling of impending panic. The usual troubleshooting tips—like clearing caches or uninstalling applications—can feel inefficient. Recently, I stumbled upon a significant source of wasted space: old Snap revisions.

After opening the Disk Usage Analyzer and running sudo du -sh /var/lib/snapd, I discovered that nearly 8GB was consumed by outdated Snap versions. These versions, remnants of every Snap application I’ve installed, were idly taking up space “just in case” I needed to roll back—something I’ve never actually done.

Why Snap Revisions Exist (and Why You Should Keep Some)

Before we dive into the cleanup process, let’s understand why Snap revisions exist and why having a couple can be beneficial.

Many users might be tempted to use scripts available online to automatically remove all disabled Snap revisions. While this approach may seem handy, it indiscriminately removes every backup, which is risky—especially for critical applications like kernels and drivers. If you’re comfortable with the risk, feel free to go that route, but a manual approach gives you greater control over what gets removed.

Snapd retains two versions of all Snap applications. This ensures that if an update causes issues, you have a reliable backup to roll back to. The silent background updates of snaps make this functionality especially useful, particularly in industrial, IoT, and edge computing environments, where stability is crucial.

For those of us with space constraints, however, an 8GB “worst-case” backup might feel excessive.

Checking What’s Taking Up Space

To get started, you’ll want to examine what specifically is eating up your precious disk space. Use the following command in your terminal:

sudo snap list --all

This command provides a comprehensive list of all installed Snaps, including cores, runtimes, and drivers, along with their revision numbers and active/disabled statuses. Although this command doesn’t return size data, you can use another command to assess the total disk usage:

sudo du -sh /var/lib/snapd

For a more visual representation, I recommend using the Disk Usage Analyzer and navigating to /var/lib/snapd/snaps. This method will display not only the sizes but also the dates of the various Snap versions, giving you insight into how old the disabled versions are.

Removing Disabled Snap Revisions

Once you’ve identified the Snap revisions you want to delete, the next step is removal—proceed with caution! Return to your terminal and execute the following command, but replace 0000 and snap-name accordingly:

sudo snap remove --revision=0000 snap-name

Before hitting enter, double-check your revision number and Snap name. There’s no confirmation prompt, so it’s easy to make a mistake.

For clarity, I recommend using two terminal windows: keep one open with the list of Snap revisions while you perform the removal in another. This helps focus your attention and minimizes errors.

This Is Not a Permanent Fix

It’s important to note that this is not a one-time solution. As new versions of installed Snaps are updated, old revisions will start to pile up again. Periodic cleanup sessions will be necessary, especially if you commonly use Snap applications.

If space is a critical issue for you and you’re reliant on Snaps, taking this time to manage Snap revisions is well worth it. On systems with multiple Snap installations, you might be shocked to find your Snap folder consuming gigabytes of space!

Conclusion

Keeping your Ubuntu file system clean and efficient can feel like a constant battle, but managing Snap revisions is a manageable task that can free up a significant amount of space. Have you ever faced issues with disk space due to Snap revisions? What strategies do you use to tackle this problem? Let me know in the comments!

Latest

Enhancing AI in South Africa with Amazon Bedrock’s Global Cross-Region Inference and Anthropic Claude 4.5 Models

Enhancing Scalability and Throughput with Global Cross-Region Inference in...

I Stuck to Home and Sweated It Out with ChatGPT’s Workout Plan

Staying Fit in the Deep Freeze: How I Used...

AI Music Scams: How Robot Fraudsters Target Platforms and Steal from Real Musicians

The Double-Edged Sword of AI Music: Creativity and Fraud...

NLP Models Exhibit Single-Nodal Symmetry Breaking in Pre-Training and Fine-Tuning Phases

Unveiling Symmetry Breaking: A Groundbreaking Intersection of Physics and...

Don't miss

Haiper steps out of stealth mode, secures $13.8 million seed funding for video-generative AI

Haiper Emerges from Stealth Mode with $13.8 Million Seed...

Running Your ML Notebook on Databricks: A Step-by-Step Guide

A Step-by-Step Guide to Hosting Machine Learning Notebooks in...

VOXI UK Launches First AI Chatbot to Support Customers

VOXI Launches AI Chatbot to Revolutionize Customer Services in...

Investing in digital infrastructure key to realizing generative AI’s potential for driving economic growth | articles

Challenges Hindering the Widescale Deployment of Generative AI: Legal,...

NASA Chooses Axiom Space for Fifth Private Astronaut Mission to the...

Axiom Space Secures Fifth Private Astronaut Mission to the International Space Station with NASA Collaboration Axiom Mission 5: Charting New Frontiers in Private Space Exploration HOUSTON,...

LEGO Unveils New Upscaled Minifigure: Blue Classic Space Astronaut!

Exciting News: Upscaled LEGO Classic Space Blue Astronaut Minifigure Coming March 2026! Exciting News: Upscaled LEGO Classic Space Blue Astronaut Minifigure Coming Soon! Mark your calendars,...

European FPGA Achieves Space Qualification

NG-ULTRA: A Breakthrough in European Space Electronics for Satellite Constellations Introduction to NG-ULTRA’s Capabilities and Applications Milestone Achievement for Europe’s Space Electronics Sector Meeting the Demands of...