View Single Post
nokiabot's Avatar
Posts: 1,974 | Thanked: 1,834 times | Joined on Mar 2013 @ india
#18
Originally Posted by wicket View Post
I've knocked up a quick script that downloads backup deb files for all packages that have been installed on your device from nokia.com and also those that have been removed (not purged). Note that this not only downloads deb files from the Ovi Store but also all system packages too (which is a good idea as we are going to lose these too). The deb files are downloaded to /home/user/MyDocs/deb/archives so make sure you've got plenty of free space available in MyDocs. I've tested the script on both Fremantle and Harmattan.

TMO doesn't allow the attachment of sh files so I'm pasting the command to create the script instead. Just copy and paste it into a terminal and then run the resultant script as root. You'll need to kill any processes that may have a lock on /var/lib/dpkg before running this script. Don't worry about any package removal or upgrade messages you may see, no changes of this nature will be made as we are only downloading the deb files.

Code:
cat << EOF > /home/user/getnokiadebs.sh && chmod +x /home/user/getnokiadebs.sh
#!/bin/sh

apt-get update

mkdir -p /home/user/MyDocs/debs/archives/partial

for pkg in \`dpkg -l | cut -f 3 -d ' '\`; do
        apt-cache policy $pkg | grep -q nokia.com && echo "Downloading $pkg" || continue
        apt-get --reinstall -y --force-yes -d -odir::cache=/home/user/MyDocs/debs install $pkg
done
EOF
awsome i am pinning it up in first post

Last edited by nokiabot; 2015-01-08 at 11:42.
 

The Following 2 Users Say Thank You to nokiabot For This Useful Post: