Aptik: PPA & package backup on Ubuntu

ubuntu_apps_compAptik is a brand new tool to simplify restoring your PPA configuration and packages post a fresh install or upgrade of Ubuntu. It makes things much simpler because you do not need to remember which software you installed and from where you installed them. If you are re-installing the same release you may not even need to download the packages again! Aptik works closely with apt and hence the name. Capabilities:

  • Backup themes and icons
  • Backup the current PPAs added in your system
  • Backup information on applications installed from those PPAs
  • Backup install packages if they are still present in apt cache (skip if upgrading Ubuntu)
  • Many cmdline options

Run the following to install Aptik:

$ sudo add-apt-repository ppa:teejee2008/ppa
$ sudo apt-get update
$ sudo apt-get install aptik

Webpage: Aptik

Repack installed packages on Ubuntu

ubuntu_logo_81x81I often try out several utilities on my system and forget to backup the deb packages. I was thinking of writing a small tool to repackage installed deb files on Ubuntu so that I can get back the deb file anytime I want. I found dpkg-repack which does exactly the same thing i.e. rebuild or regenerate a deb package from files installed on the system by the original package. It can handle a single package or a list of all packages on your system. Straight to the operations:

dpkg-repack is not installed by default. Install it:

# apt-get install dpkg-repack

To repackage a single package:

# dpkg-repack package_name

To repackage multiple or all the installed packages:

  1. List all the package present in your system in a file:
    # dpkg --get-selections | cut -f 1 > files.txt

    At this point you can edit the file to remove some packages

  2. You have to have package names space separated. Open the file in vi. Press gg to go to the first line and issue the following:
    :%s/\n/ /g

    Note that there is a space between / /. This will convert all the newlines to spaces.

  3. Issue the following to save and exit vi:
    :wq
  4. Copy the content of the file. Run the following to repackage:
    # dpkg-repack paste_file_contents_here