Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
I searched for ways to clean out unnecessary packages and associated software.
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.
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.
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.
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.
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.
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.
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.
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
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 ?
...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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.