How to safely remove default folders?
10,306
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
Related videos on Youtube
Author by
Torinouq
Updated on September 18, 2022Comments
-
Torinouq over 1 year
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?
-
Admin almost 12 yearshe's probably talking about the once in /home/$USER (ie. Desktop, Downloads) @alvar
-
Admin almost 12 yearsSorry, I completely forgot (I updated the post). Indeed, I meant precisely those in
~/.config/user-dirs.dirs
-
Admin almost 12 yearsIt's better to state the folders in the question rather than linking to an external site.
-
Admin almost 12 yearsThanks, I stated them. The link is necessary for my last question.
-
-
balu over 6 yearsThis 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. Seeman xdg-user-dirs-update
for information on what it does exactly. The actual answer should be: Simply remove the folder. (Runningxdg-user-dirs-update
is not necessary as it will be run upon the next user login, anyway, see~/.config/user-dirs.conf
.) -
Abhimanyu Pallavi Sudhir almost 6 yearsDoesn'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.
-
Abhimanyu Pallavi Sudhir almost 6 yearsSee 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).