Most poeple advise having at least 5 males if you are going for an all-male guppy group (to help disperse agression between the males), on the other hand a 45 litre tank is really too small for an all-male group of guppys, i wouldn't have such a group in anything less than 60litres (although i'd prefer at least 15-20gallons).
I would put the agression down to lack of space.
All-female groups are much easier to cater for as they are generally a lot less stressful or agressive, yes it is likely that you will still get some pregnancys as the females can store sperm inside themselves, but eventually they'll run out.
If you don't want to raise fry, simply leave them in the tank with the adults- the adult guppys will eat most, if not all, of the fry born. Either that or you can just cull any fry born in the tank.