Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've done several installations of different Ubuntu versions on my machine one over the other from a CD or live usb, and now I have a mess of swap partitions (something like 10 of them), so I need to eliminate all those and create a new one.
I also need to know how to tell the system that the new partition is the one for swap -- otherwise the system won't recognize it.

share|improve this question
up vote 3 down vote accepted

You can use Gparted to edit partitions. Delete the unwanted swap partitions and add a new one. Try to avoid moving existing partitions, as this operation takes a long time, although in-place resizing is usually pretty fast. Basically, if the tan part moves, it'll take a while. And back up everything important first.

Swap partitions tend to be recognized automatically, but you can edit /etc/fstab to tell it to use that as a swap. First right-click on the swap partition and select "information", and copy or write down the UUID. Next edit /etc/fstab:

gksu gedit /etc/fstab

Remove any lines whose third field is "swap" (be conservative; if you're not sure what to do, leave a line alone) and add a new line like this:

UUID=uuid     none     swap    0     0

Replace those spaces with tabs, and replace the lowercase string "uuid" with the UUID you copied or wrote down earlier.

share|improve this answer

Dude, clone ur system in a USB or Portable HD and then, format the device. It works much better! :P To clone ubuntu u can install Garfio or Ddrescue! see more here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.