I have linux mint on my laptop and I want to replace it by Ubuntu, and i do not want to install all my packages again so can i make backup for my installed packages and restore it on fresh ubuntu?
You can use the following command to see packages installed by the user and output it to a file:
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u) > ~/packages
Then on your new install after bringing over that generated file, you can install them like so:
sudo apt-get install $(cat packages)
Why this approach is better
apt to manage the dependencies for your platform like it is supposed to, and doesn't bring over system-installed libraries from Mint that Ubuntu will want to handle.