Remove Documents,Downloads,Music directories from home directory

How to remove those directories permanently? Not just to hide them, but delete. Every time system reboots they are recreated and I have to sudo rm -rf NastyDir*. Is there anything I can change in system settings?


Solution 1:

This has worked for me so far under Snow Leopard, I’m currently away from home and won’t be able to test this on Yostemite for quite a while:

mkdir foo
sudo mv NastyDir foo/NastyDir
sudo ln -s foo/NastyDir .

Now reboot and log in.

sudo rm -rf NastyDir foo/NastyDir

Reboot, log in, and find that there are no NastyDirs to be found.

Solution 2:

Trane is right. Love 'em or 'hate 'em the system will always recreate them when you delete them.

You might try hiding them like this using Terminal

chflags hidden ~/Documents/

That will hide (for example) the documents folder in your home directory.

Not sure if O/S X will then un-hide it for you but it might be worth a try...