Invoking Database.rollback not only rolls back inserts, but it goes much, much further.
It also rolls back:
- any DML operations, including insert, update, delete, undelete, convert lead, etc.
- sending of email: any calls to Messaging.sendEmail after the savepoint will be undone, meaning the email will be removed from the message queue of email to send (which is why email is only sent after your apex script completes).
- Calls to @future methods or Queuable jobs. Any methods called within the rolled back part of your script will not be invoked (also why @future doesn't start until your script completes).
It's worth noting that you can't serialize or otherwise preserve savepoints beyond the life of the script they were created in. For example, if a visualforce action method is invoked and it creates a savepoint a controller property would would not be able to rollback to that savepoint from a different action. Once the action that invoked apex is done the savepoint is not longer valid.
Rolling back also doesn't invoke triggers, validations, etc like a delete operation would. So once the savepoint is gone there's no way to guarantee you can restore things to their previous state.