Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum Linuxiarze.pl

Author Topic: How can I delete a swap partition?  (Read 884 times)

Offline Otto_Van_Chotto

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
How can I delete a swap partition?
« on: February 23, 2019, 08:00:01 pm »
The installation made a 17GB swap partition which I don't have plans to use (I don't hibernate my PC). How can I safely delete it?

Thanks

Offline ionmich

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: How can I delete a swap partition?
« Reply #1 on: February 23, 2019, 11:24:38 pm »
As root invoke
Code: [Select]
fdisk -l to list your drives. Then
Code: [Select]
fdisk /dev/sdx x being the drive descriptor in question. "m" will list all the command options. "p" will print all the partitions and you can see which one is formatted as swap. "d" will delete it.  "w" will write (save) the change.

CAREFUL! The wrong choice will cause much damage!

Offline lami07

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 307
  • Karma: 6
    • Sparky Community Repos
Re: How can I delete a swap partition?
« Reply #2 on: February 24, 2019, 09:15:01 am »
I advise you to disable swap (or to create swap file) before making any changes to swap partition. Info at the link below

Code: [Select]
https://wiki.archlinux.org/index.php/Swap#Swap_partition
Quote from: forum rules
When an issue has been resolved for you, please edit the original post to include <SOLVED> in the title. This provides a good indicator for users with a similar problem to check out the thread
Want to chat? Join #sparkylinux at irc.freenode.net