code: def delete(self, filename):
          
          if is_package(filename):
              self.connection["jss"].Package(filename).delete()
          else:
              self.connection["jss"].Script(filename).delete()
docs: Delete a package or script from the distribution server.
  
          This method simply finds the Package or Script object from the
          database with the API GET call and then deletes it. This will
          remove the file from the database blob.
  
          For setups which have file share distribution points, you will
          need to delete the files on the shares also.
  
          Args:
              filename: Filename (no path) to delete.