Can I delete these files?

Hello, can I delete these files in the yellow area? It seems like they were created after some error.

New Project

You can delete .xsession-errors and .xsession-errors.old if they bother you so much. But others files are better to be kept.

https://wiki.archlinux.org/title/bash#Configuration_files

No my dude, you really want to leave those files alone, unless you know exactly what you are doing. You must’ve enabled “show hidden files” in your file manager at some point. If you don’t want to “see” them, you have to go to the Nautilus settings and uncheck “Show Hidden Files” like this:

Screenshot from 2022-05-09 15-10-54

7 Likes

Oh I absolutely forgot that I enabled this setting. Thank you very much.

1 Like

Ctrl + H works as well to hide and unhide .stuff.

3 Likes

Wow, that’s an amazing tip. Thank you!

1 Like

On Linux, your user’s home directory is full of hidden files, also called dotfiles (since they begin with a dot). They are often used for configuration, and they make a total mess, but there’s nothing you can do about it. Let’s go through those in your screenshot, to see what they do:

.bashrc – this is an important one, it is a config script for the shell. It executes every time you start an interactive shell session (i.e. open your terminal). You can change it to customise your shell experience.
.bash_profile – similar to above, but gets executed when you log into your shell. Many enviornment variables are defined in this one.
.bash_logout – similar to above, but gets executed when you log out.
.bash_history – this file keeps track of your shell history (when you press ↑ in the terminal, the most recent command entered is recalled). You can delete this one, but that will forget all the commands you’ve entered into the terminal, and a new one will be created as soon as you run a command.
.lesshst – history file for the less command. If you delete this one, you probably won’t miss it terribly, and a new one will be created when you use less (for example, when reading the manpages).
.dmrc – config file for LightDM, your display manager.
.nanorc – config file for nano, the text editor.
.Xresources – config file for some X applications, stuff like colours in the terminal, fonts, XScreenSaver…
.Xauthority – a file that stores the cookie for authenticating the X session.
.ICEauthority – similar to above, but for ICE (inter process communication something something)
.xsession-errors – an error dump, you can delete this one
.xsession-errors.old – a previous error dump

14 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.