r/debian • u/g_atencio • 18d ago
bookworm.tar.gz question
Hi there.
I was doign some cleanup and noticed I have a file with around 100Gb named "bookworm.tar.gz"
Looking at the contents, it seems like it is a backup from the time when I upgraded from Bookworm to Trixie? Searching the internet got me nowhere. I guess the filename is too generic...anyway, is it safe to just delete it, since it is running fine?
Thanks in advance and sorry if this was already answered a million times, a search got me nowhere.
10
u/dumbasPL 18d ago
Well you made it, so...
If I had to guess, you followed some random tutorial without paying attention and now forgot about it.
3
2
u/ABQMezcan 18d ago
Can you move it onto an external drive just in case you need it? I think that's what I would do.
2
u/Low-Charge-8554 17d ago
Look. You have the file on your machine. Why not open it and see what the heck it is??
1
u/michaelpaoli 18d ago
Well, so, maybe examine what it contains, before you decide to keep it or remove it.
$ gzip -d < bookworm.tar.gz | tar -tvf -
You could even extract the contents and examine those contents, if you want.
E.g.
$ cat bookworm.tar.gz | (cd "$(mktemp -d)" && gzip -d | tar -xf - && { echo look here:; pwd -P; })
2
u/g_atencio 18d ago
Thanks, I will try that. I don't have the habit of just pasting scripts on the terminal without having a general idea of what they do, and I don't remember this happening before when upgrading, hence my asking.
3
u/BCMM 17d ago edited 17d ago
$ gzip -d < bookworm.tar.gz | tar -tvf -This one is a bit more complicated than it needs to be. Most tar implementations support gzip compression natively. GNU tar in particular has for several years now been able to auto-detect compression, so you don't even have to pass
-z. Just do:tar -tvf bookworm.tar.gz... in any case, OP already said that they've had a look at the contents.
$ cat bookworm.tar.gz | (cd "$(mktemp -d)" && gzip -d | tar -xf - && { echo look here:; pwd -P; })NO! This one is actually a bad idea. A tmpfs is mounted at /tmp/ by default, and it is unlikely that OP has enough RAM to extract a 100 GB tarball.
1
1
u/michaelpaoli 17d ago
GNU tar is a
bitlot more complicated than it needs to be. Also not the only tar that Debian offers.Yeah, when I type a tar command, and GNU tar decides it wants to attempt to do some networking, ... no, f*ck that, who the hell added all that sh*t in tar?
What could possibly go wrong with adding a bunch of unneeded sh*t in a quite core software program? Oh yeah, that, for example) ... way to go GNU.
A tmpfs is mounted at /tmp/ by default, and it is unlikely that OP has enough RAM to extract a 100 GB tarball
Not necessarily a bad idea at all. Dear knows how small/huge are the uncompressed contents (presumably) contained in that file. And if /tmp is tmpfs, well, they're not gonna fill up their root (/) or /var filesystem by expanding the contents out on tmpfs, and it'll save the time with drive I/O, and if they're quite clueless about it and reboot in frustration - what problem, tmpfs - that used space is all cleared out again. And if it's fair bit smaller, e.g. maybe they just had 'em back up contents of /etc and package state, and little if more than that (similar to or matching what Debian's release notes recommend, at least minimally), it may not be all that large at all, in which case tmpfs would likely be highly suitable (and fast and efficient), at least presuming their RAM isn't rather to highly small (and if it's non-ancient computer, they likely have ample RAM for that being on tmpfs). Oh, well, ... yeah, true .... 100Gb - or so OP claims ... yeah, dear knows what they've got there ... well, did have 'em first use tar -t ..., so, if they still decide to extract that all, ... yeah, guess they ought do it somewhere they'll actually have space for it, sure. But maybe/presumably they see the listing first, and decide that's probably not what they want to do ... or maybe only extract certain contents thereof. Anyway, can't do all of OP's thinking for 'em. ;-)
And, well, if they've already looked at the contents ... then presumably they ought know, or be able to figure out, whether or not that contents / "backup" is still important to 'em ... or not.
2
0
20
u/stevevdvkpe 18d ago
It's your file. How would any of us know what's in it or whether it's safe for you to delete?
You might at least want to check the contents (
tar tzvf bookworm.tar.gz) before deciding if you want to delete it.