LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2023, 09:31 PM   #1
drrummer
LQ Newbie
 
Registered: Jan 2021
Posts: 23

Rep: Reputation: Disabled
Missing Home


Hi. I'm drrummer from Dublin.

A couple of nights ago, when my laptop was overheating somewhat and being a bit laggy, I had the bright idea that I should clean out some of the hard drive.

There are two main things I did:
  1. I searched for ways to clean out unnecessary packages and associated software.
  2. I deleted apps directly through the Software Manager.

I can't remember exactly what I did, but I ran some code I found online, such as:
  • apt-get autoremove
  • apt-get autoclean
  • something about removing snap packages too.

Now all the files in my Home directory have disappeared. Even though I didn't delete any files. Is there anything I can do or any suggestion about what might have happened ?

Some other symptoms included
  • that my system has been reset to defaults. For example my web browser doesn't have it's usual customisation, and the touchpad scroll direction had been reset. I'm really not sure what has gone wrong.
  • Nemo now has a terminal type window across the top.
  • Initially when I had the issue, it showed by original folders in the sidebar, with 'x' beside them. And no content.

And of course, I have little in the way of backups.

Last edited by drrummer; 09-09-2023 at 09:35 PM.
 
Old 09-09-2023, 09:55 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,386
Blog Entries: 28

Rep: Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164
If you can be more precise about what specific actions you took, that would help a lot. It would also help to know what distro/version you are running.

You might also boot to a Live CD/USB of something and inspect your system and let us know what you see.

But, unfortunately, I have to say it sounds less than optimal.
 
Old 09-09-2023, 10:14 PM   #3
drrummer
LQ Newbie
 
Registered: Jan 2021
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
If you can be more precise about what specific actions you took, that would help a lot. It would also help to know what distro/version you are running.

You might also boot to a Live CD/USB of something and inspect your system and let us know what you see.

But, unfortunately, I have to say it sounds less than optimal.
Hi frankbell.

Thank you for the reply.

Sorry I can't be more specific, because I didn't think they were overly life-changing at the time. I thought they were just going to remove some residual package files and such.

Regarding the live session, one thing I have noticed is that a jpg i saved in the nomral session doesn't appear in the live session. Even though I mount the partition and go to the pictures folder or my user account.
 
Old 09-10-2023, 09:08 AM   #4
drrummer
LQ Newbie
 
Registered: Jan 2021
Posts: 23

Original Poster
Rep: Reputation: Disabled
Is it possible that the user account I am not using is a different one to the original user account ?
 
Old 09-10-2023, 09:19 AM   #5
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Anything is possible with the description you gave of the actions taken.

To find out you would need to look at /etc/passwd and verify the home directory listed in there for your user.
The `pwd` command will tell you what directory you are currently in and `echo $HOME` should show the proper directory for your users home. Both should show the same as was seen in /etc/passwd.

You would then need to look in that directory and see its content in order to confirm if the data is still there or not. If not then you may be out of luck but if the data still exists but for some reason is not accessible then recovery may be possible.

If the data has only been moved to the trash then accessing the trash may also allow recovery.
 
Old 09-10-2023, 10:14 AM   #6
drrummer
LQ Newbie
 
Registered: Jan 2021
Posts: 23

Original Poster
Rep: Reputation: Disabled
Hello computersavvy

Thank you for your reply. There seems to be two passwd files:
'passwd' and 'passwd-'
Neither seem to have a home directory listed.

The pwd command returnds /home/gc
The echo $HOME command returns /home/gc

I have looked in the /home/gc directory and there are no files.
Another symptom of my problems is that the home screen has reset completely to default. So the icons and shortcuts I had and personalised settings all reset. I don't even have volume control. Could this be indicative of the issue ?

Sorry I am being so vague. I was tired and just ran some lines of code that I thought were simply purging unused or no longer needed files and packages.

I really don't think I ran anything that
would or should have deleted files. Also, the system asks me for a password to access some files now, which suggests to me that the current home profile is different from the other one. It's treating me as an outsider.
 
Old 09-11-2023, 11:54 AM   #7
breadbin
Member
 
Registered: Sep 2002
Location: Dublin, Ireland
Distribution: Linux Mint 17
Posts: 160

Rep: Reputation: 26
Did you update your Linux version with the Update Manager? This happened to me with Linux Mint 19 and I chose to update to 20 but didn't realise it would wipe the home folder too.
 
Old 09-11-2023, 05:28 PM   #8
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 782
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
When laptop is overheating, cleaning out the fans is a good idea too.

Many files (and directories) in home directory start with a dot, and are hidden files, that contain many things that applications store in the background on your behalf, such as customizations, cookies, shortcuts, cached images--there are lots of them, so they are hidden so they don't get in the way of the documents, photos, videos, etc., that you create and save. To see those, there is usually a checkbox in the settings of whatever application you use to view your documents--something like "show hidden files", or a flag such as "-a" to the "ls" command when using the command-line.

But if your user's name is gc, and /home/gc is where you expect to see all your documents, and it is empty, then it sounds like whatever you did indeed created a new home directory of the same name.

However, even when removing files,unless the hard-disk has been deliberately re-written with zeros or random data, which takes a long time, the files are still there, and they can still be recovered with a data recovery tool such as testdisk/photorec -- you might be able to get it with "apt-get testdisk" but I am not sure, because the distribution I use doesn't use apt-get. Even with this tool, unfortunately recovery can still remain a chore, and your photos might come back as recovered-jpg-00, recovered-jpg-01, recovered-pdf-00, and so on, having lost all your names--but at least you still can get vital and sentimental files back.

I only had to do this once, and it was a nightmare, because though I recovered most of my photos, I also recovered lots of images the computer uses, such as emoticons, and pictures of arrows, and all the images used in all those front-end applications, as well as all those cached images from the web, so sorting the recovered files took heaps of time. After that experience, I began making regular backups in case something like that ever happened to me again. I keep a little vitual server running on a cloud--it does cost me $5usd/month--and then I use crond to run the rsync command, nightly, on my home directory, with the cloud server being the destination, and I pass it exclude flags to exclude the parts of my home directory that I don't want to back up, like cached web images, etc.

I hope you find all your data.
 
Old 09-11-2023, 10:51 PM   #9
drrummer
LQ Newbie
 
Registered: Jan 2021
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by breadbin View Post
Did you update your Linux version with the Update Manager? This happened to me with Linux Mint 19 and I chose to update to 20 but didn't realise it would wipe the home folder too.
Hi breadbin.

No, I didn't update. I just purged some old packages and cleared old software. I think I removed some Samba server stuff, and file manager things

I really wish I knew what I did.
 
Old 09-11-2023, 10:52 PM   #10
drrummer
LQ Newbie
 
Registered: Jan 2021
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by slac-in-the-box View Post
When laptop is overheating, cleaning out the fans is a good idea too.

Many files (and directories) in home directory start with a dot, and are hidden files, that contain many things that applications store in the background on your behalf, such as customizations, cookies, shortcuts, cached images--there are lots of them, so they are hidden so they don't get in the way of the documents, photos, videos, etc., that you create and save. To see those, there is usually a checkbox in the settings of whatever application you use to view your documents--something like "show hidden files", or a flag such as "-a" to the "ls" command when using the command-line.

But if your user's name is gc, and /home/gc is where you expect to see all your documents, and it is empty, then it sounds like whatever you did indeed created a new home directory of the same name.

However, even when removing files,unless the hard-disk has been deliberately re-written with zeros or random data, which takes a long time, the files are still there, and they can still be recovered with a data recovery tool such as testdisk/photorec -- you might be able to get it with "apt-get testdisk" but I am not sure, because the distribution I use doesn't use apt-get. Even with this tool, unfortunately recovery can still remain a chore, and your photos might come back as recovered-jpg-00, recovered-jpg-01, recovered-pdf-00, and so on, having lost all your names--but at least you still can get vital and sentimental files back.

I only had to do this once, and it was a nightmare, because though I recovered most of my photos, I also recovered lots of images the computer uses, such as emoticons, and pictures of arrows, and all the images used in all those front-end applications, as well as all those cached images from the web, so sorting the recovered files took heaps of time. After that experience, I began making regular backups in case something like that ever happened to me again. I keep a little vitual server running on a cloud--it does cost me $5usd/month--and then I use crond to run the rsync command, nightly, on my home directory, with the cloud server being the destination, and I pass it exclude flags to exclude the parts of my home directory that I don't want to back up, like cached web images, etc.

I hope you find all your data.
Hi slac-in-the-box

Yes, I seem to be in that position now where I have a tonne of webpage images such as icons and banners. However I have a lot of encrypted files too. Do you know how to decrypt ?
 
Old 09-12-2023, 03:36 AM   #11
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 782
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Quote:
Originally Posted by drrummer View Post
...I have a lot of encrypted files too. Do you know how to decrypt ?
Depends on what tool encrypted them. If the same tool is still available, then it should be only a matter of providing the key/pasphrase used by the tool.

With luks, you want to backup the headers, or even knowing the key/passphrase won't be enough should the headers ever become corrupted. I've use luks on the entire drive, and decrypt all the partitions as one... and I've used encfs on individual directories before. There's just so many tools providing encryption, that how to decrypt is specific to the tool.
 
Old 09-12-2023, 03:58 AM   #12
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,832

Rep: Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219Reputation: 1219
Desktop settings are usually saved in your home dir. Missing home dir - missing desktop settings.

During login the $HOME is set from the passwd (the 2nd to last field).

Perhaps you have encrypted your home dir and deleted the encryption software?
Check you home dir with
Code:
ls -lRa
find . -ls
 
Old 09-12-2023, 05:01 PM   #13
alten
LQ Newbie
 
Registered: Jul 2003
Location: New Zealand
Distribution: Mint Julia, Mint KDE
Posts: 5

Rep: Reputation: 0
Here's just a simple thing to check.
If you were clicking folders a lot while you were looking around, it's ASTONISHINGLY easy to accidentally click-move-drop a whole folder into another without even realising it. I've done it many times. Your HOME folder could be in a subfolder somewhere. Searching for something like .Desktop file could find it.
HTH
A
 
Old 09-12-2023, 09:32 PM   #14
drrummer
LQ Newbie
 
Registered: Jan 2021
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by slac-in-the-box View Post
Depends on what tool encrypted them. If the same tool is still available, then it should be only a matter of providing the key/pasphrase used by the tool.

With luks, you want to backup the headers, or even knowing the key/passphrase won't be enough should the headers ever become corrupted. I've use luks on the entire drive, and decrypt all the partitions as one... and I've used encfs on individual directories before. There's just so many tools providing encryption, that how to decrypt is specific to the tool.
I'll try to figure out the tool used.
Thanks.
 
Old 09-12-2023, 10:19 PM   #15
drrummer
LQ Newbie
 
Registered: Jan 2021
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by alten View Post
Here's just a simple thing to check.
If you were clicking folders a lot while you were looking around, it's ASTONISHINGLY easy to accidentally click-move-drop a whole folder into another without even realising it. I've done it many times. Your HOME folder could be in a subfolder somewhere. Searching for something like .Desktop file could find it.
HTH
A
Hi alten

Thanks for your input. I had a look around, but no luck.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Home, Sweet Home: Sweet Home 3D 2.1 Linux Version LXer Syndicated Linux News 0 10-06-2009 03:10 PM
contents of 'home' directory found at sda5: mounted as /home, and also on sda6:/home leswatson Linux - Newbie 4 04-18-2008 04:02 PM
Put a 2nd kanotix at hdb 3/,-4/home. 1st is at hdb8/,-9/home.#2 is using 1st's /home sleekmason Linux - General 3 12-09-2006 09:21 AM
missing jdbc isnt actually missing. trscookie Programming 0 06-04-2006 10:26 AM
Problem running UT Demo, Xlib missing on 0.0.. gldrv missing etc. RHLinuxGUY Linux - Games 3 05-21-2006 11:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration