We’ve all dealt with the annoyance of using just one half of an avocado and putting the other half in the fridge. The next day, you’re going to use it, and it’s completely brown and gross. Avocados are expensive! And there’s no reason you should completely waste half of one just because it wasn’t stored correctly in the fridge. If you do it the right way, an avocado will stay good for up to 3 days in the fridge, and here are some hacks to keep your avocados from going bad:

Store it in the fridge
First and foremost- keep the avocado in the refrigerator. Whether it’s half of an avocado or the whole thing, storing your avocados in the refrigerator keeps them going bad quickly. It feels like avocados have a very short window of when they’re ripe and tasty to eat, but keeping them in the fridge lengthens that time frame.

Make sure you eat the half without the pit first
This may seem like a given, but it’s actually essential to keep the half with the pit to keep it from going bad. The oxygen is what causes the nice green part of the avo to turn brown, and keeping the pit prevents part of it from browning, as it won’t get oxidized.

Use lemon/lime juice
Before storing the avocado half in the fridge, rub a little bit of lemon or lime juice on the green part. Then, wrap it in plastic wrap tightly, and it will stay green for up to 2 days.

Brush it with oil
To keep your avocado half fresh for tomorrow morning’s avocado toast, you can try brushing it with oil. Use a neutral-tasting oil, like canola or grapeseed oil, and then store it in an airtight container in the fridge.

Try it with an onion
Yes, you heard that right- an onion can keep your avocado half from browning. Put the avocado half in a reusable container and store a piece of onion with it before closing it. It might leave a slight onion taste, but it won’t be that noticeable.

Get an avocado hugger
And if these DIY hacks don’t do it for you, you can always use an avocado hugger, like this one. It’s basically just a silicone cup that you can conveniently place over the avocado half with a pit. It keeps your avocado fresh in the fridge.