alpinelinux / alpine-chroot-install

Install Alpine Linux in chroot with a breeze. Build ARM on Travis CI or any other x86_64 CI.
MIT License
290 stars 59 forks source link

Uninstall alphine #25

Closed pigscanflyyyy closed 3 years ago

pigscanflyyyy commented 3 years ago

Can you provide a script for uninstalling? Thank you very much.

bryanjhv commented 3 years ago
sudo umount -R /alpine/dev
sudo umount -R /alpine/sys
sudo umount -R /alpine/proc
sudo rm -rf /alpine
kasperk81 commented 3 years ago

@pigscanflyyyy, there is already a script which is mentioned after the installation:

$ ./alpine-chroot-install
...
---
Alpine installation is complete
Run /alpine/enter-chroot [-u <user>] [command] to enter the chroot
and /alpine/destroy [--remove] to destroy it.

So just run /alpine/destroy to cleanup everything.

$ /alpine/destroy --remove
Unmounting /alpine/sys/fs/cgroup/pids
Unmounting /alpine/sys/fs/cgroup/perf_event
Unmounting /alpine/sys/fs/cgroup/openrc
Unmounting /alpine/sys/fs/cgroup/net_prio
Unmounting /alpine/sys/fs/cgroup/net_cls
Unmounting /alpine/sys/fs/cgroup/memory
Unmounting /alpine/sys/fs/cgroup/hugetlb
Unmounting /alpine/sys/fs/cgroup/freezer
Unmounting /alpine/sys/fs/cgroup/devices
Unmounting /alpine/sys/fs/cgroup/cpuset
Unmounting /alpine/sys/fs/cgroup/cpuacct
Unmounting /alpine/sys/fs/cgroup/cpu
Unmounting /alpine/sys/fs/cgroup/blkio
Unmounting /alpine/sys/fs/cgroup
Unmounting /alpine/sys
Unmounting /alpine/proc
Unmounting /alpine/dev/shm
Unmounting /alpine/dev/pts
Unmounting /alpine/dev/mqueue
Unmounting /alpine/dev/console
Unmounting /alpine/dev
Removing /alpine