Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

How to remove these dotfiles and revert the system #190

Closed
tabibzadeh opened this Issue · 3 comments

4 participants

@tabibzadeh

I wonder why there isn't even one discussion on how to remove these dotfiles completely.

I just want my whole system and setup to get back where it was!
Can you give me a hint?

Thanks.

@Tatsh

There's no straightforward way of doing that. One way is to reset your $HOME directory.

Boot into verbose mode, become root with sudo su (replace yourName with your user name). You may need to run bash once to get into Bash (default is sh).

# Make a backup
mv /Users/yourName /Users/yourNameBak
mkdir /Users/yourName

# Copy non-dot files over to new directory
find /Users/yourNameBak -maxdepth 1 ! -iname '.*' -exec cp -vfR {} /Users/yourName \;

# Delete property lists since these have app and OS X settings
find /Users/yourName/Library/Preferences -iname '*.plist' -exec rm -v {} \;

# Correct ownership (change group here if you don't want it to be _staff)
chown -R yourName:_staff /Users/yourName

# Permissions
find /Users/yourName -type f -exec chmod 0640 {} \;
find /Users/yourName -type d -exec chmod 0750 {} \;

# Copy SSH settings and set correct permissions
cp /Users/yourNameBak/.ssh /Users/yourName/.ssh
chmod 0700 /Users/yourName/.ssh
find /Users/yourName/.ssh -type f -exec chmod 0600 {} \;

Then reboot and log in and everything should be reset.

@patmoore

use git to put the dot files under source control before make the changes!

@mathiasbynens

@Tatsh is right. Also, for ~/.osx stuff, you could use defaults delete …. Next time you may want to use a backup/restore script like the one in #58.

Anyway, these are my dotfiles and you shouldn’t be blindly using them as-is. Instead, fork the repository, go through the files, and delete/change what you don’t need/want.

@desimone desimone referenced this issue from a commit
@skwp skwp Added tmux support [Fix #190] 273db6a
This was referenced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.