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).
-
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.– HermannCommented Oct 19, 2022 at 12:49
-
Run midnight commander or any file manager with sudo and delete what you need– gapsfCommented Oct 19, 2022 at 17:32
Add a comment
|
1 Answer
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.