Skip to content

data: Remove all /var/tmp/flatpak-cache-* directories on boot#5584

Merged
TingPing merged 1 commit intoflatpak:mainfrom
bertogg:flatpak-tmpfiles
Nov 10, 2023
Merged

data: Remove all /var/tmp/flatpak-cache-* directories on boot#5584
TingPing merged 1 commit intoflatpak:mainfrom
bertogg:flatpak-tmpfiles

Conversation

@bertogg
Copy link
Copy Markdown
Contributor

@bertogg bertogg commented Nov 8, 2023

No one is clearing those directories so they pile up and can take a significant amount of disk space.

Resolves: #1119

No one is clearing those directories so they pile up and can take a
significant amount of disk space.

Resolves: flatpak#1119
Signed-off-by: Alberto Garcia <berto@igalia.com>
Copy link
Copy Markdown
Member

@TingPing TingPing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct to me. The cache is indeed only used for the lifetime of a users session.

I'll give a moment for any other maintainer to chime in also.

@JakobDev
Copy link
Copy Markdown
Contributor

JakobDev commented Nov 9, 2023

The cache is indeed only used for the lifetime of a users session.

If it's only for a user session, why is it in /var/tmp and not in /tmp?

@evelikov
Copy link
Copy Markdown

evelikov commented Nov 9, 2023

The cache is indeed only used for the lifetime of a users session.

If it's only for a user session, why is it in /var/tmp and not in /tmp?

AFAICT the existing code hard-codes the /var/tmp one - see

path = g_strdup ("/var/tmp/flatpak-cache-XXXXXX");
- and does not use /tmp.

@TingPing
Copy link
Copy Markdown
Member

TingPing commented Nov 9, 2023

If it's only for a user session, why is it in /var/tmp and not in /tmp?

Well /tmp is a tmpfs, so not comparable, but it is stored in /var/tmp for system packages as its likely on the same filesystem as /var/lib/flatpak.

@bertogg
Copy link
Copy Markdown
Contributor Author

bertogg commented Nov 10, 2023

If it's only for a user session, why is it in /var/tmp and not in /tmp?

Well /tmp is a tmpfs, so not comparable, but it is stored in /var/tmp for system packages as its likely on the same filesystem as /var/lib/flatpak.

Also it's my understanding that /tmp should not be used for large files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent /var/tmp/flatpak-cache from piling up

4 participants