 We're continuing on videos, we're looking at working with Debian packages and so now let's say that you have your system set up how you like it but you want to do an install on a new machine or for some reason you're going to reinstall this machine and you want to make a backup list of all your installed packages because on Linux it's very easy to install whatever packages you need using your package manager whether you use app to get or just aptitude. But if you have a lot of packages installed sometimes you get a new system you're like oh you go to use something like oh I didn't install that and got installed or you're trying to remember what you installed so you just want to make a backup list of all the packages you have installed so when you set up your new system you can just say install all these packages it's very simple to do and so let's go ahead and do it. Last time we used dpkg and the dash dash get selections to get a list of all installed and de-installed packages we're not going to want our de-installed packages so let's run this through grep again with a dash vd install and that should give us just the packages that are installed on our system. So let's go ahead and put those into a file using a greater than symbol so we're going to redirect it we'll just call it packages dot list you can call it whatever you want so you made that list back it up put it on a flash drive online somewhere that you can grab it after when you do your new system so when you get to your new system you're going to want to install this package so you're going to run apt or apt get or aptitude which are when you use install deselect and of course you want to do that with sudo i already have that installed let me go ahead and clear my screen here now there's a few different ways that you can load that list of packages and then install them you can do it all in one command if you use aptitude so if you don't have aptitude install aptitude um i'm going to say aptitude install and of course you do this with sudo or as root and then we're going to say dollar sign pregnancy so this is going to run a command and basically put the command in place of this spot here so basically we want to display our list so we're going to say cat packages so that cats it up but if you remember if we were to let me split my screen here real quick whoops and if i was to cat packages you'll see that it has less packages but also has this every line says install over here so what we want to do is we want to remove that so we're going to do is pipe this into awk and then we're going to say uh inside single quotes and inside curly brace we're going to say print dollar sign one and actually if i do that down here awk print dollar sign one that's saying print just the first column so you don't get that that column that says install uh so let's go ahead and run this and when i do that it's going to tell me all these packages are installed because i'm on the system i just made that list on but just to show you that it works i'm going to uh sudo aptitude remove zip so i'll just remove a package i'll uninstall it okay so that's our insult so now if i was to run this command again so it's sudo aptitude and if you don't have aptitude installed you can use apt or apt to get to install it um install and i guess you you could probably use apt as well we'll try that in a second uh it should work because all we're doing is creating a list right here of things to install so i'll run that and this time it's going to say that it's installing zip and so now zip is installed so let me go ahead and uninstall it again remove zip yes so i installed it so again if i cut out packages you can see a list you know the 4065 packages i have installed on this system uh including the zip which i just uninstalled so let's go ahead and run this command again but let's just do it with apt this should work i haven't tried this yet yeah it works uh it asks in this case it said do you want to continue i press yes if you do a dash y at the end of this let me just go through this again i'll remove zip again so i'm uninstalling installing uninstalling installing zip just as an example um but i'm going to dash y and this time it should run through without asking me anything there we go so it downloaded and installed zip so that is how you create a backup your list so again to review over what we did we'll do dpkg so we're doing dpkg dash dash get dash selections and then i'm doing that uh piping that into grep to remove any line of the de-installed packages and i'm just putting those into a plain text file save that somewhere go to your new system on your new system uh do sudo apt install deselect because apparently that needs to be installed to do this if you don't have it installed already and then what we can do here is run on your new system copy over that list and then say sudo apt install and then side dollar sign braces you're gonna say cat out this list remove that second column and install it pretty simple it's you know three commands to back up a list and reinstall every program every package you have on your system as long as you're using uh you know the same repositories on both systems and you use repositories to install stuff again this is debbie and based system so linux mint ubuntu and a barrage of other uh distributions and uh i hope that you enjoyed the tutorial and i hope you visit my website filmsbychris.com that's chris of the k there's a link in the description as always i asked that you visit there you can search through the videos from both my channels there you can also find the support section or look in the description of this video uh for supporting over on patreon or paypal and i just hope that you have a great day