Deleting unwanted junk files and folders from BOOT PARTITION

Quick to answer questions about finding your way around LMDE as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums within the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Justme Aussie
Level 1
Level 1
Posts: 10
Joined: Thu Sep 30, 2021 9:39 pm

Deleting unwanted junk files and folders from BOOT PARTITION

Post by Justme Aussie »

Hello dear nerds!...

I am still a newbie in Linux (I am too old and slow to memorize commands). I am now testing Linux LMDE for the first time and I LOVE IT. Previously, I installed Debian12 Bookworm which caused me lots of troubles with Plasma and backups, plus there is no enough support about that OS yet.
So, I'm Installing my new version of LMDE. All was going OK until at the very end. HOWEVER, when I was about to backup the entire system, with all programs and stuff working beautifully, I mistakenly chosen the boot sector (idiot me not checking the size correctly first) which it saturated with backup system snapshot data and it was cut-off as soon as the partition was filled. To make things worst, I run Timeshift again but it was soon cut-off. Fortunately, I STILL (don't know for how long) can boot my system, but I MUST delete those junk files from boot. Every time I reboot the system, LMDE appears but I get a warning sign that my boot partition must be clear from junk.

- Now my problem is:
1) NOTHING (the existing created 2 snapshots) appear in Timeshift to delete from there at all.
2) I cannot delete the Timeshift snapshots (which are 2 folders) directly from the boot partition, nor from Properties (I cannot change permissions. I assume the kernel is protecting itself).
3) I read online some command suggestions but I am not that savvy about them because most guys assume most people understand them well enough, instead of writing a SIMPLE and direct command sequence.
4) I am not trying to delete "old" or "updated" snapshots from boot. They are actually 2 incomplete first and new created snapshot folders (loading a new LMDE) that are useless and wrongly placed, non-accessible. My urgency is time, because I have to work, whilst reloading my OS all over again takes me more than a day. This new LMDE system was beautifully OK, but it won't be for long if the boot partition is already saturated.
5) Can I save my snapshots in my sda3 partition? (SEE ATTACHED SCREENSHOTS)
6) Is it any Linux tool (or program with GUI) that can help do this?

- Please, can anybody help me? Your prompt response (before my new OS collapses) will be ENORMOUSLY appreciated. Thank you. :roll:
Attachments
My Screenshot.png
Last edited by SMG on Wed Nov 29, 2023 4:45 pm, edited 5 times in total.
Reason: Moved to LMDE forum.
sleeper12
Level 21
Level 21
Posts: 14609
Joined: Thu May 25, 2017 3:22 pm

Re: Deleting unwanted junk files and folders from boot

Post by sleeper12 »

Maybe you can do it from your Mint install media?
Justme Aussie
Level 1
Level 1
Posts: 10
Joined: Thu Sep 30, 2021 9:39 pm

Re: Deleting unwanted junk files and folders from boot

Post by Justme Aussie »

sleeper12 wrote: Tue Nov 28, 2023 9:55 pm Maybe you can do it from your Mint install media?
Are you sure that I can I delete files or folders from the installed LMDE boot partition through my original USB pendrive? How please?
sleeper12
Level 21
Level 21
Posts: 14609
Joined: Thu May 25, 2017 3:22 pm

Re: Deleting unwanted junk files and folders from boot

Post by sleeper12 »

I've never done it, so no, I'm not sure which is why I said maybe.
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Deleting unwanted junk files and folders from boot

Post by linux-rox »

The correct command in general is sudo rm -r /timeshift. In this case, my hunch would be that you need to use sudo rm -r /boot/timeshift. To do this from a live session, by the way, you would first mount the boot partition (sudo mount /dev/sda2 /mnt) then sudo rm -r /mnt/timeshift.

Note: That's to remove the entire folder. One also can remove specific snapshots; indeed, ISTM that scenario is much more common.
Command would be something like sudo rm -r /timeshift/snapshots/[date-and-time].


In my experience, it's significantly faster (for reasons unknown) to delete Timeshift snapshots with sudo rm. If you're keen to use GUI, open File Manager as Root. You do that by opening it the regular way, then right-click somewhere blank in the right pane; Open as Root will be one of the options. Then, select File System in the left pane and rummage around until you find the /timeshift folder.

As for whether you can save snapshots on the system partition, that works in a Cinn 21.1 test box with FDE, so I'm sure it works with LMDE also. Or you could put the Timeshift archive on sdc; if you do, give its own partition (60 GB should be plenty).
Justme Aussie
Level 1
Level 1
Posts: 10
Joined: Thu Sep 30, 2021 9:39 pm

Re: Deleting unwanted junk files and folders from boot

Post by Justme Aussie »

linux-rox wrote: Tue Nov 28, 2023 10:46 pm The correct command in general is sudo rm -r /timeshift...
Thank you so much for you kind, complete, clear, and quick reply. I'll try your suggestions tonight, and I'll give you a feedback about my result. If I fail, I guess it's just me (too slow with Linux but love it) and I may have to reload all over again. Hopefully not... Cheers buddy! :D
Last edited by karlchen on Wed Nov 29, 2023 4:38 am, edited 1 time in total.
Reason: added the missing closing [/quote] tag, thus separating the quoted part from the reply part
Justme Aussie
Level 1
Level 1
Posts: 10
Joined: Thu Sep 30, 2021 9:39 pm

Re: Deleting unwanted junk files and folders from boot

Post by Justme Aussie »

linux-rox wrote: Tue Nov 28, 2023 10:46 pm The correct command in general is sudo rm -r /timeshift. In this case, my hunch would be that you need to use sudo rm -r /boot/timeshift. To do this from a live session, by the way, you would first mount the boot partition (sudo mount /dev/sda2 /mnt) then sudo rm -r /mnt/timeshift ... etc
Hi there,

I’ve tried different ways as you mentioned to me with no luck. But… have you noticed from the screenshots I’ve sent above that the snapshots I (mistakenly) saved them within my boot drive (not sda, which is for other things)? I think my boot drive is on the sdb3 (but again, not sda)
Even typing sudo mount /dev/sda3 /mnt (with the space between sda3 and /mnt), after my password I get the message:
mount: /mnt: special device /dev/sda3 does not exist.
dmesg(1) may have more information after failed mount system call.
Also, as I mentioned above, my snapshots are NOT within the Timeshift folder, I mistakenly saved them within boot, and I cannot access them nor delete them. They do not appear on Timeshift either. Thanks again for your help.
Last edited by Justme Aussie on Sat Dec 02, 2023 10:09 pm, edited 1 time in total.
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Deleting unwanted junk files and folders from BOOT PARTITION

Post by linux-rox »

You seem to have rebooted, so what previously was sda is most recently sdb. For the first screenshot, sdb (as then labeled) isn't shown, which implies it's the 2 TB drive and has Windows (or at least, no ext4 partitions). For the second screenshot, the 2 TB drive seems to be sda, the 180 GB drive is sdb, and the 6 TB drive is no longer shown, which implies it's a USB hard drive and not attached.

In both screenshots, the boot partition on the 180 GB drive is #2, sda2 in the first screenshot and sdb2 in the second. If that's not where you told Timeshift to save its snapshots, you didn't save them on the boot partition.

Please report the output of df -hT -x squashfs -x tmpfs -x devtmpfs. Use copy-and-paste with code tags, not a screenshot.
Justme Aussie
Level 1
Level 1
Posts: 10
Joined: Thu Sep 30, 2021 9:39 pm

Re: Deleting unwanted junk files and folders from BOOT PARTITION

Post by Justme Aussie »

- I deleted my previous screenshot for security reasons (too many details about my HDD)
- My previous sda partition comes from another separate (internal) hard drive that contains a complete different content from previous formats in my desktop computer, but not for booting.
- This time, I disconnected all the other hdds that I use for other data to avoid confusion. So, now after reboot, it’s showing my boot as sda drive. I only left this one where my boot system is (SSD drive) and programs are within the 2 partitions (apparently created when I installed my new Linux LMDE), where one of them was filled (and saturated) with snapshots data because of my idiotic mistake where I obviously chosen the smaller one.
- Since 3 years, I NEVER had Windows partition in any of the current hard drives (I hate Windows), and my sda and sdb drives are Ext4 – 100% Linux drive partitions. \
However, YES, I did (my mistake as I mentioned before) ask Timeshift to save the snapshots within one of my 2 sdb partition (now showing as sda after disconnecting the other HDDs), which was filled quickly with the snapshot. But I cannot access nor delete them.
- As requested, I include below my df -hT -x squashfs -x tmpfs -x devtmpfs
- My question again PLEASE: How can I access that partition (sdb boot – not sda in my case) to delete those snapshot folders? Where exactly are they?

Code: Select all

user@user:~$ df -hT -x squashfs -x tmpfs -x devtmpfs
Filesystem               Type  Size  Used Avail Use% Mounted on
/dev/mapper/lvmlmde-root ext4  132G      20G  105G  16% /
/dev/sda2                             ext4  944M  182M  698M  21% /boot
/dev/sda1                              vfat  286M  5.9M  280M   3% /boot/efi 
Attachments
My last screenshot
My last screenshot
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Deleting unwanted junk files and folders from BOOT PARTITION

Post by linux-rox »

Sorry, I'm not going to play hide-and-seek, but as far as I can tell the boot partition is fine. Good luck.
Justme Aussie
Level 1
Level 1
Posts: 10
Joined: Thu Sep 30, 2021 9:39 pm

Re: Deleting unwanted junk files and folders from BOOT PARTITION

Post by Justme Aussie »

linux-rox wrote: Sun Dec 03, 2023 12:48 pm Sorry, I'm not going to play hide-and-seek, but as far as I can tell the boot partition is fine. Good luck.
Nope, it is not, but I still thank you anyway. The boot drive (now sd3 - encrypted) on Linux LMDE has been saturated with the Timeshift files that I erroneously set over there, instead of somewhere else. I'm barely been left with 1GB (+ warning notices every time I reboot). Txs again. :roll:
Attachments
My actual boot partition
My actual boot partition
Last edited by Justme Aussie on Fri Dec 15, 2023 9:12 pm, edited 1 time in total.
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Deleting unwanted junk files and folders from BOOT PARTITION

Post by linux-rox »

So, part of the problem is you don't know what boot partition means. This is why experienced users generally recommend against system encryption for newbies. You have no idea what you're doing. Best solution would be to start over and forget encryption. Or encrypt only data files.

If someone else wants to jump in and try to fix this mess, please feel free.
Justme Aussie
Level 1
Level 1
Posts: 10
Joined: Thu Sep 30, 2021 9:39 pm

Re: Deleting unwanted junk files and folders from BOOT PARTITION

Post by Justme Aussie »

One thing is to be a "newby", where... "there is no such thing as "stupid" questions" (as per Forum rules)... but another completely different is to be responded in the way you did. Thank you.
I encrypted that partition assuming that it was "better (?)" for my pc security, assuming that Linux LMDE programmers are not so stupid (like me) neither to give me that option from the beginning where that accidentally I've set my Timeshift snapshot folder. That's the problem with the arrogance from some "nerds" (not all fortunately), they believe that most newbies are idiots when we they try to learn something new asking step-by-step commands or questions. I'm 67 and I still love Linux, but it is not so easy to learn as when I'd have 20 or 40. Still you didn't respond my respectful query above and try to get away like with this last answer? Perhaps that's why Windows (which I hate and I will never use again) or Mac are still around.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Deleting unwanted junk files and folders from BOOT PARTITION

Post by SMG »

Justme Aussie wrote: Tue Dec 12, 2023 12:12 amThe boot drive (now sd3 - encrypted) on Linux LMDE has been saturated with the Timeshift files that I erroneously set over there, instead of somewhere else.
That is not your "boot drive". That is your root partition.

The partitions which say "boot" in them in the Mount Point column of the screenshot you posted are boot partitions. Those partitions are not full. Nothing needs to be removed from your boot partitions. Leave them alone.

The partition you highlighted in your screenshot says lvmlmde. It does not say boot. So you can stop calling it your boot partition.

If you tell Timeshift to save to its default setting location, it will save snapshots to your root partition--Root partition not Boot partition.

It is important that you understand that difference before you start deleting things. You have repeatedly called your Root partition by the wrong name. You did not encrypt your Boot partition. You encrypted your Root partition.
Justme Aussie wrote: Fri Dec 15, 2023 9:35 pm Still you didn't respond my respectful query above and try to get away like with this last answer?
Your respectful query was correctly answered. You not only outright dismissed that correct answer, you also appear to have mocked it.

Encrypting your install makes troubleshooting much harder and complicated and makes problems harder to fix. While it might be easy to click that button during the install, it is a good idea to understand the ramifications of the buttons you are clicking. There are many ways to safeguard your data and while encryption is one way, it is not the only way. Additionally, there are different encryption strategies. It is also important when encrypting to know the difference between a root partition and a boot partition.

It is especially important to know the location of the boot partition when one is juggling more than one drive because knowing its location is important if you have booting problems.

Hopefully, you will now realize terminology matters and to get help with your problem you need to use the correct terminology. I suggest you re-read all the posts in this topic with your new-found understanding.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Deleting unwanted junk files and folders from BOOT PARTITION

Post by linux-rox »

Justme Aussie wrote: Fri Dec 15, 2023 9:35 pm ... respectful query
My irony meter just exploded. You can have the satisfaction of putting me in my place with the rolleyes emoji.
You cannot reasonably expect I will thereafter undertake to help you in any way. Have a nice day.
Justme Aussie
Level 1
Level 1
Posts: 10
Joined: Thu Sep 30, 2021 9:39 pm

Re: Deleting unwanted junk files and folders from BOOT PARTITION

Post by Justme Aussie »

SMG wrote: Fri Dec 15, 2023 11:05 pm
Justme Aussie wrote: Tue Dec 12, 2023 12:12 amThe boot drive (now sd3 - encrypted) on Linux LMDE has been saturated with the Timeshift files that I erroneously set over there, instead of somewhere else.
That is not your "boot drive". That is your root partition... You encrypted your Root partition.
Dear SMG,

I didn’t mean to “outright dismissed that correct answer” from linux-rox at all. I only refer to THE WAY he responded to me last… I felt he was mocking me as an idiot when I confused Root with Boot partition (wrongly assuming that one was inside the same partition containing my Timeshift snapshots)… and still he keeps on referring to his “irony meter as exploding”??!!… That’s exactly what I call “nerd-arrogance”, something very common among us all-knowing-males, whilst most women in IT are usually better than us, so "proud males", we may like it or not. That DOES NOT HELP newbies. Aren’t we allowed to make mistakes, including “stupid questions”?!… Can’t you expect confusion among us in basic Linux terminology and true knowledge in partitioning, system kernel layouts, etc.?
However, your respectful answer SMG did oriented me into the kernel of my confusion when I was wrong (which I admit it when I am, absolutely!), and I will keep investigating even more about the Linux-kernel structure within any HDD or SDD partitioning and my ageing brains. Even though, if trying I screw everything more, then I will reformat the entire drive again as linux-rox suggested (I always keep backups of everything). It's the time I have to dedicate again, when I wrongly assumed I just could delete those snapshot files easily. My frustration, was that when I formatted, and tried LMDE, loaded everything + apps + all settings OK (in the middle of other personal urgent matters), then… I’ve then chosen the wrong spot to keep my Timeshift snapshots. I’ve only tried to get rid of them (which were saturating a drive with more warning notices) and using the default setting again. If I have to reformat (which I suspect I may have to), then... OK, I will not use now the encryption next time.
Yes, I can also understand that many new Linux users can be abusive or lazy, and expect miracle answers, but (at my age) still I did not have all the time to study in-dept this OS yet, when I have to keep working on translations to survive. But I still do the best when I can.
I am indeed, truly amazed when people work together in Linux trying to help, and I am thankful to all for that (including linux-rox), but when there is a real help, if they truly have that “expertise” whilst being patience and understanding. From life-experience, we do not know as much as we think, less to put ourselves in someone else's shoes. We all are still children in this world while we think "we know everything"… Far from it!… Yet, I continue learning from my wife, children and grandchildren… and I have to apologize to them for f...g-up this world so much with our generation's idiocy of “knowing all” for "their best"…
I apologize TO ALL (including linux-rox) if my terminology caused him confusion, but I cannot accept his last words without a proper explanation (of my mistake) as you did this time SMG. I thank you for that, and now I think I am oriented where I’ve screwed thing-up.
I sincerely wish you all the best Xmas (besides I am not religious as most) and a New Year with family + friends. This 2023 was too crazy… world-wide already.
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Deleting unwanted junk files and folders from BOOT PARTITION

Post by linux-rox »

You realize, right? The history of the thread is right there for everyone to read. You can try to spin it any way you like, but no one is required to accept the spin. Fact is, I told you the correct answer and you told me three times I was wrong. Funny thing is, had you worked with me, I could have walked you through how to fix the problem. Instead we have this ugly argument where I'm wondering why I bother.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Deleting unwanted junk files and folders from BOOT PARTITION

Post by SMG »

Justme Aussie wrote: Sat Dec 16, 2023 10:43 pm Aren’t we allowed to make mistakes, including “stupid questions”?!… Can’t you expect confusion among us in basic Linux terminology and true knowledge in partitioning, system kernel layouts, etc.?
You did not express confusion for the instructions you received and there is no standard of a Linux newbie knows. That means we can only go by the feedback you post. You did not ask linux-rox why they told you your boot partition was fine when you felt it was not. Had you done that, that would have indicated to anyone reading this topic that something was amiss in your understanding of the issue. Instead you double-downed repeating your question as if you were talking to a recalcitrant child. Adding the eyeroll emoji did not help your cause. No one volunteering their time to help others wants to be mocked for doing so.

Those of us helping others assume people know what they are doing unless they either specifically tell us otherwise, or through repeated posts it finally becomes clear one does not understand. In your case, the latter happened. Until that point, we on our end were puzzled why you kept repeating your question when you already had been given the answer.

For future reference, the boot folder is normally inside of the root partition when one does a default install. However, that does not happen when one encrypts their install. In that case, there is a separate boot partition which is outside of the encrypted root partition. That is part of the additional complexity of an encrypted install.

I'm going to lock this topic now. Let's put this aside and start fresh if you have new questions and please tell us if you do not understand why someone is repeatedly telling you something that does not seem to be answering your question. There is nothing wrong with saying, "Can you please explain why [fill in the blank]". All of us, regardless of skill level, run into situations where we miss something obvious or do not understand what is being said. That is not something which only happens to newbies.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Locked

Return to “Beginner Questions”