If you are going to create loop device with partitions you should use losetup -P. Then all partitions will be removed with losetup -d.
If you are going to create loop device with partitions you should use losetup -P.
Then all partitions will be removed with losetup -d.