Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

bertogg
Copy link
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 <[email protected]>
Copy link
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
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

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
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
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.

@TingPing TingPing merged commit 14d735b into flatpak:main Nov 10, 2023
9 checks passed
@bertogg bertogg deleted the flatpak-tmpfiles branch November 11, 2023 22:04
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