8

In the File Manager (Xubuntu 12.04), I can see some default folders which I don't need (like Videos, Music, ...). Is it safe to remove them or might programs not work properly afterwards (like on Mac OS X where I tried that once)?

I found this thread on Ubuntu Forums How to permanently delete folders "Music, Videos, Documents,...." (through Nautilus) . Is this the way one should remove these folders?

5
  • What folders are you talking about?
    – Alvar
    May 21 '12 at 9:10
  • he's probably talking about the once in /home/$USER (ie. Desktop, Downloads) @alvar
    – Rinzwind
    May 21 '12 at 9:13
  • Sorry, I completely forgot (I updated the post). Indeed, I meant precisely those in ~/.config/user-dirs.dirs May 21 '12 at 9:30
  • It's better to state the folders in the question rather than linking to an external site.
    – Alvar
    May 21 '12 at 9:51
  • Thanks, I stated them. The link is necessary for my last question. May 21 '12 at 12:24
12

Yes. See post #7 in your link.

Backup the config file (optional):

cp ~/.config/user-dirs.dirs ~/.config/user-dirs.dirs.bak

Edit the file by commenting out unnecessary entries:

vim ~/.config/user-dirs.dirs

Run update command:

xdg-user-dirs-update

DO NOT REMOVE XDG_DESKTOP_DIR

3
  • 1
    This does not do what OP asked. xdg-user-dirs-update will simply update ~/.config/user-dirs.dirs (and might, in particular, override some of OP's modifications from before), not create/rename/remove any directories as the above instructions suggest. See man xdg-user-dirs-update for information on what it does exactly. The actual answer should be: Simply remove the folder. (Running xdg-user-dirs-update is not necessary as it will be run upon the next user login, anyway, see ~/.config/user-dirs.conf.)
    – balu
    Jan 12 '18 at 0:48
  • Doesn't work -- even if you don't run the update command, it gets updated upon the next reboot. There must be a more fundamental file in which these directory names are kept. Jun 25 '18 at 5:32
  • See here for a working solution. If you also want to remove the folders from the home directory, edit user-dirs.defaults, or make a copy of it in .config and edit there (for your local user). Jun 25 '18 at 6:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.