Last active
January 10, 2019 00:17
-
-
Save BrunoTorresF/faf41b071aab013ca680461d01a919fa to your computer and use it in GitHub Desktop.
shell script to delete all user files and folders, uninstall Spotify, and reset Unity settings (Ubuntu 16)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # delete local user files and empty trash | |
| find /home/$USER/* -maxdepth 1 \! \( -name Documents -o -name Pictures -o -name Music -o -name Downloads -o -name Desktop -o -name Videos -o -name Public -o -name '\.*' -o -name Templates -o -name Examples -o -name Public \) -exec sudo rm -rf '{}' \; | |
| sudo rm -rf /home/$USER/Documents/* /home/$USER/Pictures/* /home/$USER/Music/* /home/$USER/Downloads/* /home/$USER/Desktop/* /home/$USER/Videos/* /home/$USER/Public/* | |
| rm -rf ~/.local/share/Trash/* | |
| # remove git config | |
| git config --global --unset-all user.name | |
| git config --global --unset-all user.email | |
| # uninstall Spotify & remove config files | |
| sudo apt-get remove spotify-client && rm -R ~/.config/spotify && sudo rm /etc/apt/sources.list.d/spotify.list | |
| # reset Unity settings | |
| dconf reset -f /org/compiz/ && setsid unity | |
| reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment