A cover opening and closing unit for an image forming apparatus, comprising: a cover removably mountable to a main body of the image forming apparatus, the main body including a waste-developer receptacle therein; and a locking device to fix the cover to the main body of the image forming apparatus, characterised in that: the locking device is configured to be released from the main body only after the waste-developer receptacle is removed from the main body, wherein the locking device comprises: a rotary handle (210, 220); a locking member (212, 222) to extend and retract in association with rotation of the rotary handle, and being resiliently biased by a first resilient member (213, 223); a cam member (211, 221) rotatable in association with rotation of the rotary handle to thereby extend and retract the locking member, wherein the first resilient member is disposed between the cam member and the locking member; a restriction unit (230, 240) to reciprocate between a first position to hinder rotation of the cam member and a second position released from the cam member; and a sensing lever to be displaced according to whether the waste-developer receptacle is mounted in the main body, and thereby to move the restriction unit (230, 240) to the second position when the waste-developer receptacle is removed. a cover removably mountable to a main body of the image forming apparatus, the main body including a waste-developer receptacle therein; and a locking device to fix the cover to the main body of the image forming apparatus, characterised in that: the locking device is configured to be released from the main body only after the waste-developer receptacle is removed from the main body, wherein the locking device comprises: a rotary handle (210, 220); a locking member (212, 222) to extend and retract in association with rotation of the rotary handle, and being resiliently biased by a first resilient member (213, 223); a cam member (211, 221) rotatable in association with rotation of the rotary handle to thereby extend and retract the locking member, wherein the first resilient member is disposed between the cam member and the locking member; a restriction unit (230, 240) to reciprocate between a first position to hinder rotation of the cam member and a second position released from the cam member; and a sensing lever to be displaced according to whether the waste-developer receptacle is mounted in the main body, and thereby to move the restriction unit (230, 240) to the second position when the waste-developer receptacle is removed. the locking device is configured to be released from the main body only after the waste-developer receptacle is removed from the main body, wherein the locking device comprises: a rotary handle (210, 220); a locking member (212, 222) to extend and retract in association with rotation of the rotary handle, and being resiliently biased by a first resilient member (213, 223); a cam member (211, 221) rotatable in association with rotation of the rotary handle to thereby extend and retract the locking member, wherein the first resilient member is disposed between the cam member and the locking member; a restriction unit (230, 240) to reciprocate between a first position to hinder rotation of the cam member and a second position released from the cam member; and a sensing lever to be displaced according to whether the waste-developer receptacle is mounted in the main body, and thereby to move the restriction unit (230, 240) to the second position when the waste-developer receptacle is removed. a rotary handle (210, 220); a locking member (212, 222) to extend and retract in association with rotation of the rotary handle, and being resiliently biased by a first resilient member (213, 223); a cam member (211, 221) rotatable in association with rotation of the rotary handle to thereby extend and retract the locking member, wherein the first resilient member is disposed between the cam member and the locking member; a restriction unit (230, 240) to reciprocate between a first position to hinder rotation of the cam member and a second position released from the cam member; and a sensing lever to be displaced according to whether the waste-developer receptacle is mounted in the main body, and thereby to move the restriction unit (230, 240) to the second position when the waste-developer receptacle is removed.