0

I have two partitions with two kubuntu's, one in /dev/sda1 along with home directory and other in /dev/sda2(able to access /home in sda1 via mounting). I wish to remove kubuntu in /dev/sda1 while keeping /home intact, so that only /dev/sda2 boots still able to access /home(leftover of /dev/sda1).

2
  • What have you tried so far? In terms of permissions, there is nothing special about the directories (as seen from an inactive system). You can remove them as usual.
    – Hermann
    Commented Oct 19, 2022 at 12:49
  • Run midnight commander or any file manager with sudo and delete what you need
    – gapsf
    Commented Oct 19, 2022 at 17:32

1 Answer 1

0
if cd /mnt/sda1; then
    echo -n "Do you want to delete: `ls | grep -v home`? (y/n)"
    read answer
    test "$answer" = "y" -o "$answer" = "Y" && sudo rm -rf `ls | grep -v home`
fi

Totally untested, exercise extreme caution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .