Editing Back up your applications
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 11: | Line 11: | ||
To follow this tutorial, you need root access on your device and the following tools: | To follow this tutorial, you need root access on your device and the following tools: | ||
*Terminal emulator (X Terminal or SSH) | *Terminal emulator (X Terminal or SSH) | ||
- | *VIM editor (Available in | + | *VIM editor (Available in Extras) |
== Create the Archive folder == | == Create the Archive folder == | ||
* Open a terminal emulator and create the required folders using the following command: | * Open a terminal emulator and create the required folders using the following command: | ||
<pre> | <pre> | ||
- | + | mkdir /home/user/MyDocs/apt-archive-cache | |
- | + | mkdir /home/user/MyDocs/apt-archive-cache/archives | |
- | + | mkdir /home/user/MyDocs/apt-archive-cache/archives/partial | |
</pre> | </pre> | ||
- | + | If you wish to use a different folder, substitue /home/user/MyDocs with the desired path. | |
- | + | ||
- | + | ||
- | + | ||
- | If you wish to use a different folder, | + | |
== Create Package-List == | == Create Package-List == | ||
*As a normal user type the following command to create a file (package.list) that contains a list of all the packages installed on the device: | *As a normal user type the following command to create a file (package.list) that contains a list of all the packages installed on the device: | ||
- | <pre>$ dpkg --get-selections|grep install|grep -v deinstall>/home/user/package.list | + | :<pre>$ dpkg --get-selections|grep install|grep -v deinstall>/home/user/package.list |
</pre> | </pre> | ||
- | + | == Second Step == | |
- | + | In case you just want to download a selection of packages from that list, you should edit it and remove the lines you do not need. | |
+ | |||
+ | We are going to show you an easy way to do that. Let us suppose that you just want to download a copy of the package ''abiword'', then you should: | ||
*As a normal user type the following command: | *As a normal user type the following command: | ||
- | <pre>$ cat /home/user/package.list|grep abiword> | + | <pre>$ cat /home/user/package.list|grep abiword>package-abiword.list</pre> |
- | + | Let us suppose that you want to download all packages, except one of them: ''debconf'', for example. Then you should: | |
*As a normal user type the following command: | *As a normal user type the following command: | ||
- | <pre>$ cat /home/user/package.list|grep -v debconf> | + | <pre>$ cat /home/user/package.list|grep -v debconf>package-without-debconf.list</pre> |
- | == | + | == Third (and Last) Step == |
After previous steps, you have a list with all the desired packages you want to download to your device. In our previous examples this list could be any one of these: | After previous steps, you have a list with all the desired packages you want to download to your device. In our previous examples this list could be any one of these: | ||
Line 51: | Line 49: | ||
Now you just need to edit this list in order to use it with ''apt-get'': | Now you just need to edit this list in order to use it with ''apt-get'': | ||
*As a normal user type the following command: | *As a normal user type the following command: | ||
- | <pre>$ | + | <pre>$ vi /home/user/package.list </pre> |
*After ''vi'' editor is running, then type the following command: | *After ''vi'' editor is running, then type the following command: | ||
<pre> :%s!install!! </pre> | <pre> :%s!install!! </pre> | ||
*This last command will clean the lines, removing the word ''install'' and leaving just the name of the packages. Now we want to add an order for ''apt-get'' to download the desired packages, so type the following command: | *This last command will clean the lines, removing the word ''install'' and leaving just the name of the packages. Now we want to add an order for ''apt-get'' to download the desired packages, so type the following command: | ||
- | <pre> :%s!^!apt-get --force-yes -yy -d install --reinstall | + | <pre> :%s!^!apt-get --force-yes -yy -d install --reinstall ! </pre> |
*This last command will add to the beginning of each line the needed instructions for ''apt-get'' to only download the packages: ''-d install --reinstall''. In order to prevent the script from stopping at any question we have inserted the ''--force-yes -yy'' option. Now we just need to save the file typing the following command: | *This last command will add to the beginning of each line the needed instructions for ''apt-get'' to only download the packages: ''-d install --reinstall''. In order to prevent the script from stopping at any question we have inserted the ''--force-yes -yy'' option. Now we just need to save the file typing the following command: | ||
<pre> ZZ </pre> | <pre> ZZ </pre> | ||
- | |||
- | |||
*To execute the script we need first to get ROOT access. | *To execute the script we need first to get ROOT access. | ||
*Then as ROOT type the following command: | *Then as ROOT type the following command: | ||
<pre> # sh</home/user/package.list </pre> | <pre> # sh</home/user/package.list </pre> | ||
- | + | It is done. All desired packages have been downloaded and can be listed with the following command: | |
- | + | <pre>$ ls /var/cache/apt/archives|grep deb </pre> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | <pre>$ ls / | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | </pre> | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
== Further Questions == | == Further Questions == | ||
If you have further questions, do not hesitate to place the question here in this section, and it will be answered in short. | If you have further questions, do not hesitate to place the question here in this section, and it will be answered in short. | ||
- | |||
- | |||
- | |||
- | |||
- |
Learn more about Contributing to the wiki.