this post was submitted on 10 Mar 2024
13 points (84.2% liked)

Linux

48328 readers
589 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

A few months ago, I rolled back to a previous btrfs snapshot using Snapper. Now I am constantly running out of space, no matter how many packages I delete and I'm wondering if that is the reason. The snapshot list looks like this:

$ sudo snapper -c root list
    # | Type   | Pre # | Date                             | User | Cleanup | Description            | Userdata
------+--------+-------+----------------------------------+------+---------+------------------------+---------
   0  | single |       |                                  | root |         | current                |         
1137+ | single |       | Thu 31 Aug 2023 07:55:47 PM CEST | root |         | writable copy of #1115 |         

Does snapshot 1137 contain all the changes made since August? I so, can I somehow delete it?

EDIT Changed "snapshot 0" to "snapshot 1137"

top 4 comments
sorted by: hot top controversial new old
[–] Ephera@lemmy.ml 11 points 8 months ago

This can be a bit confusing. When you uninstall packages, new snapshots get created, which take up more space.

Additionally, snapshots are incremental. So, if you were to install openSUSE and then install 5000 packages one-by-one, you'd have 5001 snapshots, but it would still only take up about the same amount of space as what has been snapshotted.
What makes snapshots take up lots of space, is if there's lots of differences between snapshots. So, if you install texlive and later uninstall it again, it still has to keep the entirety of texlive in your snapshots.

So, the best way to get back disk space is to delete old snapshots. That just tells it that you don't care about whatever differences may have existed between snapshots at the time.

[–] federalreverse@feddit.de 9 points 8 months ago* (last edited 8 months ago) (1 children)

You can find out:

snapper --iso list should include a column "Used space" in its output.

snapper delete --sync *ID* deletes a snapshot and frees up space.

Nb: I am not a Snapper user personally. The link above takes you to the official docs.

[–] nawordar@lemmy.ml 3 points 8 months ago (1 children)

I don't have the "Used space" column, probably because I have quota disabled. I managed to find out using btdu, that the snapshot 1137 takes ~8.3 GiB.

I cannot delete it using that command, because it is marked with "+" which means it is the "btrfs default subvolume", according to snapper manual. I wonder if there is still a way to get rid of it.

[–] federalreverse@feddit.de 2 points 8 months ago

According to the docs, running snapper rollback should set the right snapshot as the default.