A method for finding fuel-optimal trajectories for spacecraft subjected to avoidance requirements is introduced. These include avoidance of collisions with obstacles or other vehicles and prevention of thruster plumes from one spacecraft impinging on another spacecraft. The necessary logical constraints for avoidance are appended to a fuel-optimizing linear program by including binary variables in the optimization. The resulting problem is a mixed-integer linear program (MILP) that can be solved using available software. The logical constraints can also be used to express the configuration requirements for maneuvers where only the final relative alignment of the vehicles is important and the assignment of spacecraft within the fleet is not specified. The collision avoidance, trajectory optimization, and fleet assignment problems can be combined into a single MILP to obtain the optimal solution for these maneuvers. The MILP problem formulation, including these various avoidance constraints, is presented, and then several examples of their application to spacecraft maneuvers, including reconfiguration of a satellite formation and close inspection of the International Space Station by a microsatellite, are shown. These examples clearly show that the trajectory design methods presented are particularly well suited to proposed formation flying missions that involve multiple vehicles operating in close proximity.