Mysterious '~' folder in my home

Hello, i need help, a folder named '~" linking to my home recently appears IN my home diretory…

I’m looking for a way to remove it, cause i think this is not normal. I already had this issue with a ‘/’ directory and i can tell that a sudo rm is not a good idea…

Any help?

1 Like

Is it an empty folder?

If so, you can safely use the rmdir command, which will only work on an empty folder.

Make sure to place double-quotes around the tilde, so that it interprets it as a the literal name (rather than as your $HOME variable.)

rmdir -v "~"

EDIT: Oh, I realized it might be a symlink, as you alluded.

In that case, like above, you need to surround the tilde in double-quotes.

rm -v "~"
1 Like

Or you can use rm -r <the directory, you want to remove>.

if you type in terminal
~/ o ~
refers to your home, /home

To see what it it, in your home directory, execute:

stat "~"

Careful with unquoted ~ in that command! It’ll get expanded to your home folder.

I have not written rm -r ~.

~ points to your home directory. Are you sure it is actually “within” your home directory?
You can check that using “ls /home/$(whoami)”. Does “~” show up when typing this command?
If not, then it is completely normal. Just a way for you to type less when cd’ing into your home directory.

I think it’s a simlink, when I open it I am again in my home

The method above should work.

Quick question. My roommatyes machine with Manjaro KDE has a folder in his Downloads partition on a ext4 drive that no matter what I do will not delete. It’s been there through 3 different OS’s. Will this remove the folder finally? Thanks

It really depends on the object. Using file or stat on the object can clue you in.

For example, special characters, white spaces, or even double spaces can cause issues for certain applications and GUI file managers.