how to package installed packages?

Yes, you can use dpkg-repack to accomplish this.

  1. Install dpkg-repack Install dpkg-repack and fakeroot Install fakeroot (to avoid being root to repackage). Or from the terminal:

    sudo apt-get install dpkg-repack fakeroot
    
  2. Repackge installed package

    fakeroot -u dpkg-repack <package name>
    

And you'll find the package in the current directory.

Note that any changes on the system on the package after it has been installed will be reflected in the repackaged version!