Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

My computer is dual booting windows 7 and ubuntu (12.04). My ubuntu partition has an encrypted root and home. The trouble is that for a while the /root partition has been almost full (94% to 98%. I haven't been able to run updates without being very selective because of the lack of space.I try to clean up the root directory, but it never clears up more than 100 or so mb of memory. The /root partition has 5.5GB of space, which is apparently not enough, although it is more than what was recommended by a guide I originally used. Basically, I have tons of free space on my /home and I'd like to shrink it and reallocate the free memory to the /root. I can't figure out how to deal with the resizing on encrypted partitions.

Additionally, I do have a good amount of completely unallocated space (about 25gb) available, so if adding some of that to the /root is an easier process, then some instruction on that would also be really helpful. I'm still a beginner with linux, so clarity and details (& explanations) would be much appreciated.

Lastly, I've gone through the ResizeEncryptedPartitions post, but had trouble with adding the free space to the encrypted partition.

share|improve this question
Woah, your /root partition shouldn't be that big - mine's 11 MB. Run sudo su -c "du -hs /root | sort -h | tail" and tell us what it says. – Kupiakos Apr 2 '13 at 2:52
Kupiakos, this is linux, not every machine is going to match yours. My root drive is 201GB used, try and tell me it's wrong. – coteyr Apr 2 '13 at 3:05

My recommendation is do do this in three steps.

First, decrypt your home partition.
Second, resize per usual
Third, re-encrypt your home partition.

Technically speaking the box-unbox is not needed, but should something go wrong you have a better chance of recovery.

Here is the semi-offical documentation. Note that it does not state that you have to decrypt first. That is just a personal preference of mine.

So on a higher level. You want to resize home smaller and resize root larger. It's pretty straight forward. Again I prefer to decrypt - encrypt, but that basically just means copying files to a temp partition and then copying back to the new larger (or in this case smaller) partition. Again that's completely tase and if you follow the documents you should have probably be ok.

This is what I would do
0. Make a full backup (you already have this right)
1. Create a large enough temp ext3 partition somewhere like a USB hard drive, and copy over everything in home with sudo cp /home/ /tmp/partition/ -R
2. Delete your home partition
3. Resize your root partition
4. Create a new home partition in the left over space
5. Copy the files from /tmp/partition back to /home
6. You may have to fix permissions, it depends.

share|improve this answer
It's worth noting in what I wish was super bold BACKUP FIRST yep, I'm yelling that. Backup first. Please :P – coteyr Apr 2 '13 at 3:11

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.