code: def remove_thin_device(name, force=False):
          
          cmd = ['dmsetup', 'remove', '--retry', name]
          r = util.subp(cmd)
          if not force:
              if r.return_code != 0:
                  raise MountError('Could not remove thin device:\n%s' %
                                   r.stderr.decode(sys.getdefaultencoding()).split("\n")[0])
docs: Destroys a thin device via subprocess call.