0

I uninstalled protonvpn from the site where they recommend:

sudo apt-get autoremove protonvpn, 

then

rm -rf ~/ .cache/protonvpn 

then

rm -rf ~/ .config/protonvpn

Shortly after the system hung and then had to power off and log back in. At first when I typed my password it just went back to the log in screen, like 10 times. Finally let me log in and it was like my user profile was reset. Default desktop screen, tried to open files and it wouldn't. I saw to do sudo nautilus and change permissions back to my user. The seemed to let me access the home folder. All my apps are still installed and my password works. I can change to root, etc. Just where did all the folders that had my music and pictures go? I looked at the disk and its still about the same as it was. Around 32 Gb of data. Nothing was formatted, nothing reset. It's like all my folders were hidden. Help please!

user68186
  • 33,360

1 Answers1

1

The Problem

You entered the command:

rm -rf ~/ .cache/protonvpn

The key mistake is the ~/space.cache/protonvpn. In effect you entered:

rm -rf ~/

where the ~ is the shortcut for your home directory /home/crabman. In other words you entered:

rm -rf /home/crabman/ .cache/protonvpn

The two options you used are r and f. From the man page:

-r, -R, --recursive
    remove directories and their contents recursively
-f, --force
    ignore nonexistent files and arguments, never prompt

The command would also try to delete .cache/protonvpn. The file/folder .cache/protonvpn was already deleted by the rm -rf ~/. Normally you would get an error that the file/folder does not exist. However, the -f option means the error was ignored.

See this page for some examples of the rm command.

Therefore, you deleted all the files and folders in your home folder.

Two Solutions

1. Restore from backup

Ubuntu comes with a default Backup app. If you use that or any other backup app to make backups to an external or network drive, then you should restore your home folder from the backup.

Note, your home folder contained all your app configuration files that is specific to your username, other than your personal files. The backup app backs up all these hidden configuration folders and files along with your personal files like music and photos.

2. Recover Deleted files

There are various methods to recover deleted files and folders. The easiest of them is to restore from the Trash folder. Unfortunately there are two problems to this approach in your case:

  1. The Trash folder was also deleted when you deleted your home folder.
  2. When you use the rm command, the files and folders are "permanently" deleted and is not moved to the Trash folder.

You can try other file/folder recovery methods described in:

How to recover deleted files?

Note, as you have been running the computer and trying various things, the internal drives are being used. This means some of the deleted files may not be recoverable as other files (for example, the recovery app you will install) may use the space freed up by your deletion.

Hope this helps

user68186
  • 33,360