how to get rid of gnome’s default directories

well, almost

i’ve tried to completely eliminate them before, and it’s not worth the effort. so, i just hide them from myself; i’m just as happy that they’re not polluting my ls output. only takes a minute to perform four steps:

1: create a hidden directory

since directory names that begin with a dot are hidden from normal directory listings, i create a directory that has a leading dot in its name. for example:

mkdir $HOME/.PHONY.gnome.directories

2: edit $HOME/.config/user-dirs.dirs

then, replace all the default directory names in the file with the name of the new hidden directory name, i.e.,

XDG_DESKTOP_DIR="$HOME/.PHONY.gnome.directories"
XDG_DOWNLOAD_DIR="$HOME/.PHONY.gnome.directories"
XDG_TEMPLATES_DIR="$HOME/.PHONY.gnome.directories"
XDG_PUBLICSHARE_DIR="$HOME/.PHONY.gnome.directories"
XDG_DOCUMENTS_DIR="$HOME/.PHONY.gnome.directories"
XDG_MUSIC_DIR="$HOME/.PHONY.gnome.directories"
XDG_PICTURES_DIR="$HOME/.PHONY.gnome.directories"
XDG_VIDEOS_DIR="$HOME/.PHONY.gnome.directories"

3: tell gnome to update its settings

by running the following command:

xdg-user-dirs-update

4: remove the default directories

you already ensured that they are empty of anything that you’d want to keep, right?

cd
rm -rf Desktop Downloads Templates Documents Music Pictures Videos