Delete Orphaned Directories

Comments

12 comments

  • Phil Reilly

    What exactly is the error rmdir returns?

  • Eric Milward
    rmdir: failed to remove "name-of-directory": Directory not empty. 
  • Phil Reilly

    If you must & assuming "name-of-directory" contains no directories:

    chronos@localhost / $ cd name-of-directory
    chronos@localhost / $ sudo rm *.*
    chronos@localhost / $ cd ..
    chronos@localhost / $ sudo rmdir name-of-directory

    Good luck!

  • Phil Reilly

    You may have to mount the file system as read write?

    chronos@localhost / $ sudo mount -o remount,rw /

  • Eric Milward

    it won't let me remount the system as r/w because it's already write-protected. also the directory does contain additional directories

  • Phil Reilly
    chronos@localhost / $ sudo disable_verity

    then reboot
    then
    chronos@localhost / $ sudo mount -o remount,rw /

  • Phil Reilly

    ..then you need to go to the end of the directory list & work your way back up doing:

    chronos@localhost / $ sudo rm *.*
    ....... as described above.
  • Phil Reilly

    ..or forget about it!

  • Eric Milward

    oh screw all that. I'll just grab a USB stick, boot into a Linux Live environment, mount the partition, and delete the directories from there. I was hoping to avoid that but oh well. Thanks anyways, lol.

  • Phil Reilly

    ...Not sure that's much different than what I said. From my experience rmdir will not work recursively with non-empty directories. If you change something from a remote boot you may not be able to boot cloudready without running disable_verity.

  • Eric Milward

    Yeah I just screwed myself. I tried mounting the partition (sda16) from a Linux Live environment and then deleting the files but I forgot the OS is encrypted. So I said "screw it" but now CloudReady won't boot. I just get a blinking underscore and caps lock light. :-/

  • Phil Reilly

    At least you still have all your appendages!

Please sign in to leave a comment.