I keep everything at first but then weed out regularly and ditch paperwork for stuff I don't have anymore or that is well out of guarantee/warranty periods.
I tend to note on the invoice/receipt the length of the retailers/manufacturers guarantee/warranty period which really helps, both in terms of knowing when to ditch it and for reference when things go faulty so I can quickly see whether it's still under warranty.
At the moment, I've got receipts/invoices for items such as a kitchen pan set (lifetime warranty), heat pad (manufacturers 3 year warranty), electric shower (manufacturers 5 year warranty), laptop (one year warranty), and lots of other things like that.
For online returns, I keep receipts and proofs of postage until I've checked the refund has been paid. For things with shop's 28 day refund policy (M&S, Argos, Wickes, etc)., I keep the receipt until the 28 days are up. For supermarket shopping, I keep the receipt until I've eaten/used what I've bought which enables me to return for refund anything that's gone off within a day or two of purchase etc (typically fruit and veg these days!).
Obviously "big" stuff, I keep virtually forever, such as house completion statement, invoices for home improvements, car purchases, insurance documents, etc.
That's not to say I keep paper copies of everything - for online purchases, I'll just save the pdf of the invoice to the cloud rather than printing it off and keeping it. I wouldn't trust hoping to recover from old emails or online suppliers websites etc as there's no guarantee you'll be able to access them in years to come, hence saving PDFs to the cloud which is under my own control.