0

I am running macOS Catalina 10.15.7 on a 2020 MacBook Pro. I do a bit of programming in R and Python, and in my home directory I saw a bunch of hidden files:

enter image description here

There are files related to .python_history, .r, .rstudio-desktop, .jupyter, ipython etc. I'm not sure why they are placed here - is it safe to delete these files?

3
  • Why would you want to delete them when you work with R etc?
    – nohillside
    Commented Feb 12, 2021 at 10:30
  • @nohillside Just to keep things tidy
    – Tyler D
    Commented Feb 12, 2021 at 10:48
  • The files/directories are hidden by default already anyway. Removing them will remove Jupyter et al.
    – nohillside
    Commented Feb 12, 2021 at 10:51

1 Answer 1

1

Many cross-platform software packages adopt a convention of keeping configuration and data in dot-files/directories inside your home folder. Most of the time this behavior is not configurable and if you remove these then you’re likely to lose some or all of your configuration and/or data for these programs.

As @nohillside mentions, these are already hidden both in the Finder and at the shell prompt by default. The only reason to be concerned about tidiness is if you’re worried about other users on your system being able to read and/or write these files. The default umask on macOS is 022 which means that new files and folders are, by default, world-readable. If this is a concern, you should manually set the permissions of all dot-items in your home directory (e.g., chmod go-rwx ~/.*). (You can also set your default umask to something more restrictive, like 077, by adding such a command to your .zprofile.)

1
  • 1
    A newer configuration used by Unix programs is to put the config files in ~/.config rather than ~ to make the home directory cleaner. Look for XDG_CONFIG_HOME in the manuals for the programs you are using
    – mmmmmm
    Commented Feb 12, 2021 at 11:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .