man 1 flatpak-override
Overrides the application specified runtime requirements. This can be
used to grant a sandboxed application more or less resources than it
requested.
By default the application gets access to the resources it requested
when it is started. But the user can override it on a particular
instance by specifying extra arguments to flatpak run, or every time
by using flatpak override.
The application overrides are saved in text files residing in
$XDG_DATA_HOME/flatpak/overrides in user mode.
Scroll down, you will see the --reset
option to remove the overrides.
I noticed you used sudo
to run the command, so I think the override files are stored in /var/lib/flatpak/overrides/
. To get everything back to normal, try deleting everything inside that directory.
If you want to override the system-wide settings, you can create files in the same format as the ones in /var/lib/flatpak/overrides/
, but put them in /home/your_username/.local/share/flatpak/overrides/
.
To generate the pre-config settings for a flatpak, you can use the flatpak -m info app_id
command. This will show you some info about the flatpak, and the -m
option will print out the metadata. You can also save this info to a file by running flatpak -m info app_id > ~/.local/share/flatpak/overrides/app_id
.
When you edit the file, pay attention to the Context
, System Bus Policy
, and Session Bus Policy
sections and delete everything else. By default, flatpak is set to share some resources, but you can deny access by adding an exclamation mark before the resource, for example, you could change shared=network
to shared=!network
.
If you're looking for a user-friendly way to manage flatpak permissions, I recommend checking out flatseal
. It's a great GUI tool that can make it easier for you in this case.
That being said, it's always a good idea to be cautious when using commands posted online. Make sure you understand what you're doing before copying and pasting anything into your terminal. And if you're ever unsure about something, there are some great resources available to help you out.
One of the best places to start is the Arch wiki, and I think, man
is a friend everybody needs!