 Hey everybody welcome back to the channel. Today I'm going to be talking about a little program called GDU. Now GDU is a disk based management tool written in Go and it is meant for SSDs but you can use it for your hard drives and basically what it does is it allows you to go through and view your file system sorted by size or other ways and hunt and find for those files that are taking up a ton of space on your drives and delete them if you can. Now I'm going to put this right up front. Don't delete something unless you know exactly what it is because if you delete something and you turns out your system actually needs that file or a program needs that file you could end up boinking things so just be careful when you're going through and using tools like this. Now a lot of tools there are many different tools that allow you to manage your disks and a lot of them are based on a terminal command called GDU and GDU is great if you're more focused on just running things in the terminal and not really caring how they look or how they work or stuff like that. If you want to get into the very nerdy way of managing stuff DU is great and there are many different applications built upon that. So there's GUI ones, there's terminal based ones that are all kind of built on the shoulders of DU and GDU is another one of those only it was written in Go and it's meant to be fast so a lot of these tools are actually pretty slow but GDU is actually fairly quick. Now I say fairly quick but if you're running this on regular hard drives you'll notice that it's just as slow as DU is because it still has to it's very limited based on the speed of your drives. So if you're running it on SSD you'll notice that this is very fast even if you have a large SSD but if you're running it on a mechanical hard drive it's going to take a long time to actually scan those files. So let's go ahead and jump in and I'll show you how to use this. You can install GDU from the AUR or you can install it via snap. There are a few other ways to install that and I will leave a link to the GitHub page for GDU in the show notes and you can go ahead and take a look there there because there are a few other ways you can install this. So once you have it installed you can run it by going GDU in the terminal and that will show you your home directory. By default it's sorted by size so you're getting the biggest files first and it goes down to the smallest files. You can sort it in any number of ways you can reverse the sort of the size by hitting S and that will show you the smallest to the biggest. You can also sort by name by hitting N and that will show you alphabetical and you hit N again and it will show you alphabetical reversed and you can go back to size by hitting S twice and that will go through and get you back to where you were. Now there are a few ways to navigate. You can use the arrow keys so if you go up and down we'll take you up and down obviously and you can use right to go into a file, left to go out of a file and that's how you navigate with the arrow keys. If you are more comfortable with them keys you can use J and K to go up and down, L to go in, H to go back out and if you're in them like say you're way down here at the bottom you know in the middle somewhere and you want to go back to the top GG will take you back to the top, capital G will take you to the bottom. Okay now if you want to delete something you can do so very easily. You can go through and let's find something here that I can delete. So I can go into the cache file here and probably yay because there's probably something here that I can delete. If I can delete this here to delete it you just hit the letter D just kind of like you would in them and in this case it's going to ask you are you sure? And you can disable this by saying don't ask me again. I'm going to have it keep asking me just in case. I'll always ask for confirmation. So just hit yes and then it's been deleted. So that is GDU in a nutshell now. If you want to do something else outside of your home directory you can do so very easily. So Q to quit. We'll just use GDU-D and that'll show you all the drives mounted to your system. Now I have two SSDs here. I can hit the other SSD and that will actually show up fairly fast and then I can just navigate like just like I did with the in my home directory. Now I'm gonna back out of this and run this again and this drive here is a mechanical external hard drive. It's ginormous has 1.6 terabytes on it and it's gonna take forever to load and I'm just gonna show you this and it's not gonna act I'm not actually gonna make you sit here and wait for it but I'm gonna just hit enter and it's gonna go through and take quite a bit of time. Now it's not gonna take a ton of time. It's faster than what I would say other ones other tools similar to this are but it does take sometimes it's definitely not as fast as those SSDs were and you can expect that because it takes longer to go through and scan something on a mechanical drive that it does on an SSD. Now it'll also take longer if your external hard drive isn't spooled up mine spooled on over time so the reason why this one actually is going faster than I saw earlier is because my drives actually connected and I'm up and running so I'm actually surprised at how quick this was but I'm still gonna go ahead and just quit because we don't need to sit through that whole thing. So let's go ahead before we jump out of this and just look at the man page and this will kind of show you just how simple this application is. There's not a ton to this man page it's only I don't know a few few lines long you get help you can ignore certain directories especially if you're running it en route you can get the log file you can use no colors no cross then across file system boundaries no progress that doesn't they'll make so you don't show the progress mode when you're deleting large files and stuff non-interactive do not run an interactive mode I'm not exactly sure what that means show discs that would show all wanted this that's the D option that we just use show parent size and show version that's literally all there is now I use a few different flags and stuff you can go through this and you know if you get one of these errors and stuff so that is GDU in a nutshell there's not a lot to it and it's very simple and like I said it's very fast especially compared to some of the other ones now especially the GUI tools that are like this a lot of them are very slow even on SSDs because they're trying to do things in graphical magical ways that oftentimes take up more system resources and more time so I like GDU it's one of those tools that I'm just gonna keep installing my system I'll be able to go through and do some hunting and pecking for some of those pesky cash files so like I back up my system every single night so every every night my system is backing up that yay cash file and it really does not need to do that but it does so I have like 12 or 13 copies at any given time with that yay cash file on my external hard drive and each one of those is like seven or eight gigabytes and I could go through and delete all of those and that would save me quite a bit of space and I'm pretty sure everybody's is like that everybody has these files that are backed up that you don't really need to be backed up and you can just go through and delete them using a tool like GDU and it's easier than going through and CD slash run slash media slash you know whatever trying to get into those things and then deleting them willy-nilly you know one file at a time so one thing I didn't notice was a way to down to delete multiple files at once I'm not sure if you can do that I haven't really experimented with that I'm sure there's probably is a way let me go actually go look and see I'm curious so if we just do GDU again and we just go into the downloads folder and say if I wanted to delete my ISOs if I hit no I thought maybe if I hit the space file that would allow the space bar would let me select multiples yeah I don't see a way here to select multiple files so that's one area that this is kind of lacking because I would like to be able to go through and select multiple files at once you know and delete them all at once that'd be kind of cool anyways doesn't really matter it's still cool still something that I'll use and I hope you found it interesting as well make sure you follow us on Twitter you can do so at the Linuxcast you can also support us on patreon at patreon.com slash Linuxcast and with that mind I would like to thank our patrons Devon, Zach, Marcus, Merrick, and Camp thanks for your support thanks everybody for watching I'll see you next time