Skip to content

m1st0/snap-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Snap Disabled Versions Cleanup Script

This Python script removes all disabled or old Snap packages from an Ubuntu-based system and restarts the snapd service to ensure proper operation.

If you find this project useful and would like to support its development, consider donating via PayPal or Venmo:

© 2025 Maulik Mistry

This project is licensed under the Apache License 2.0. See the LICENSE.txt file for full license text.

Features

  • Uses subprocess for secure command execution.
  • Automatically removes all disabled Snap revisions.
  • Restarts snapd service and checks its status.

Usage

  1. Ensure Python 3 is installed.
  2. Save the script to a file, for example: cleanup_snap_disabled.py.
  3. Make the script executable: chmod +x cleanup_snap_disabled.py
  4. Run with: ./cleanup_snap_disabled.py

Note: This script requires sudo privileges since it modifies system-level Snap installations.

References

About

This Python script removes all disabled or old Snap packages from an Ubuntu-based system and restarts the snapd service to ensure proper operation.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages