Because Quicken is a database, and creating new records are costly performance wise, records that are deleted are only marked "Deleted" so they can be reused without creating a new record. The only thing that will reduce the size of the data file is by using: File → Copy or Backup File → Create a copy or template. This one does a record by record copy leaving out the records marked deleted. But be aware of the fact that Quicken will also remove all online services in the copy as part of the process.
BTW you are going to have to be removing a huge amount of transactions to have much affect unless thoses transactions have attachments (which do take up a lot of space), because transactions don't really take up much space.
how big is the file? what is 'too large' to you? what performance issues are you experiencing? how old is your PC?
@CG - the QDF file size doesn't really impact any aspect of using Quicken -
to see how your file compares…. here is our QDF file stats ….. —> Help —> SHIFT+About Quicken