Both openSUSE and SLES configure snapper to automatically create disk snapshots when applications are installed or uninstalled, and when configuration changes are done via YaST. This allows restoring the system to a previously functional state when any of the processes cause system issues. However, the disk snapshots take precious disk space and might grow to an unacceptable size over time.

You can remove existing disk snapshots created by snapper in openSUSE and SLES using snapper itself. You can use snapper to delete a specific or a range of disk or filesystem snapshots.

Step-by-step video guide:

Steps to delete disk snapshots in openSUSE and SLES:

  1. Open terminal from the launcher.
  2. List available available snapper configs.
    > sudo snapper list-configs
    [sudo] password for root: 
    Config | Subvolume
    -------+----------
    root   | /
  3. List snapshots for selected config.
    > sudo snapper --config root list
      # | Type   | Pre # | Date                            | User | Used Space | Cleanup | Description           | Userdata     
    ----+--------+-------+---------------------------------+------+------------+---------+-----------------------+--------------
     0  | single |       |                                 | root |            |         | current               |              
     1* | single |       | Mon 13 May 2019 10:56:13 AM +08 | root |  94.09 MiB |         | first root filesystem |              
     2  | single |       | Mon 13 May 2019 11:09:54 AM +08 | root |  35.94 MiB | number  | after installation    | important=yes
     3  | pre    |       | Thu 23 May 2019 09:40:29 PM +08 | root |   1.30 MiB | number  | zypp(zypper)          | important=yes
     4  | pre    |       | Thu 23 May 2019 09:55:34 PM +08 | root |   1.28 MiB | number  | zypp(zypper)          | important=yes
     5  | post   |     4 | Thu 23 May 2019 10:13:52 PM +08 | root |  79.21 MiB | number  |                       | important=yes
     6  | pre    |       | Sat 25 May 2019 10:54:26 PM +08 | root |   1.25 MiB | number  | zypp(zypper)          | important=yes
     7  | pre    |       | Sat 25 May 2019 10:57:04 PM +08 | root | 912.00 KiB | number  | yast repositories     |              
     8  | post   |     6 | Sat 25 May 2019 11:02:12 PM +08 | root |  14.52 MiB | number  |                       | important=yes
     9  | post   |     7 | Sat 25 May 2019 11:02:38 PM +08 | root | 368.00 KiB | number  |                       |              
    10  | pre    |       | Sat 25 May 2019 11:26:12 PM +08 | root | 236.00 KiB | number  | zypp(zypper)          | important=no 
    11  | post   |    10 | Sat 25 May 2019 11:26:13 PM +08 | root | 340.00 KiB | number  |                       | important=no
  4. Delete snapshot based on snapshot number.
    > sudo snapper --config root delete 2

    Using ranged parameter such as the following will delete snapshots numbered 1 to 10.

    > sudo snapper --config root delete 1-10

    Snapshot numbered 1 can't be deleted.

  5. List snapshots for selected config again to confirm.
    > sudo snapper --config root list
     # | Type   | Pre # | Date                            | User | Used Space | Cleanup | Description           | Userdata
    ---+--------+-------+---------------------------------+------+------------+---------+-----------------------+---------
    0  | single |       |                                 | root |            |         | current               |         
    1* | single |       | Mon 13 May 2019 10:56:13 AM +08 | root |  30.93 MiB |         | first root filesystem |         

Guide compatibility:

Operating System
openSUSE Tumbleweed
openSUSE Leap 15.1
openSUSE Leap 15.0
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12
Discuss the article:

Comment anonymously. Login not required.

Share!